diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/file.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/file.cpp b/src/file.cpp index a8ff49cb6..57ad8b54c 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -1040,6 +1040,9 @@ file_import(SPDocument *in_doc, const Glib::ustring &uri, { SPDesktop *desktop = SP_ACTIVE_DESKTOP; bool cancelled = false; + + // store mouse pointer location before opening any dialogs, so we can drop the item where initially intended + auto pointer_location = desktop->point(); //DEBUG_MESSAGE( fileImport, "file_import( in_doc:%p uri:[%s], key:%p", in_doc, uri, key ); SPDocument *doc; @@ -1150,7 +1153,7 @@ file_import(SPDocument *in_doc, const Glib::ustring &uri, desktop->getDocument()->ensureUpToDate(); Geom::OptRect sel_bbox = selection->visualBounds(); if (sel_bbox) { - Geom::Point m( desktop->point() - sel_bbox->midpoint() ); + Geom::Point m( pointer_location - sel_bbox->midpoint() ); selection->moveRelative(m, false); } } |
