Fixed stuck mouse-drag-selection on dropped-file

Resolves #109
This commit is contained in:
rxi 2020-05-20 09:24:06 +01:00
parent bc4bf3d384
commit 08ce7e2563
1 changed files with 2 additions and 1 deletions

View File

@ -320,7 +320,8 @@ function core.on_event(type, ...)
local mx, my = core.root_view.mouse.x, core.root_view.mouse.y
local ok, doc = core.try(core.open_doc, select(1, ...))
if ok then
core.root_view:on_mouse_pressed("left", mx, my, 1)
local node = core.root_view.root_node:get_child_overlapping_point(mx, my)
node:set_active_view(node.active_view)
core.root_view:open_doc(doc)
end
elseif type == "quit" then