Merge pull request #729 from adamharrison/fix-treeview-clicking
Fix TreeView and StatusView clicking
This commit is contained in:
commit
dadfa4b3e8
|
@ -30,6 +30,7 @@ function StatusView:on_mouse_pressed()
|
||||||
and not core.active_view:is(LogView) then
|
and not core.active_view:is(LogView) then
|
||||||
command.perform "core:open-log"
|
command.perform "core:open-log"
|
||||||
end
|
end
|
||||||
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -216,11 +216,11 @@ end
|
||||||
function TreeView:on_mouse_pressed(button, x, y, clicks)
|
function TreeView:on_mouse_pressed(button, x, y, clicks)
|
||||||
local caught = TreeView.super.on_mouse_pressed(self, button, x, y, clicks)
|
local caught = TreeView.super.on_mouse_pressed(self, button, x, y, clicks)
|
||||||
if caught or button ~= "left" then
|
if caught or button ~= "left" then
|
||||||
return
|
return true
|
||||||
end
|
end
|
||||||
local hovered_item = self.hovered_item
|
local hovered_item = self.hovered_item
|
||||||
if not hovered_item then
|
if not hovered_item then
|
||||||
return
|
return false
|
||||||
elseif hovered_item.type == "dir" then
|
elseif hovered_item.type == "dir" then
|
||||||
if keymap.modkeys["ctrl"] and button == "left" then
|
if keymap.modkeys["ctrl"] and button == "left" then
|
||||||
create_directory_in(hovered_item)
|
create_directory_in(hovered_item)
|
||||||
|
@ -240,6 +240,7 @@ function TreeView:on_mouse_pressed(button, x, y, clicks)
|
||||||
core.root_view:open_doc(core.open_doc(doc_filename))
|
core.root_view:open_doc(core.open_doc(doc_filename))
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue