summaryrefslogtreecommitdiffstats
path: root/src/file.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/file.cpp')
-rw-r--r--src/file.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/file.cpp b/src/file.cpp
index 7f1872ca2..4e46a6e16 100644
--- a/src/file.cpp
+++ b/src/file.cpp
@@ -148,14 +148,14 @@ SPDesktop *sp_file_new(const std::string &templ)
DocumentUndo::setUndoSensitive(doc, true);
}
- SPDesktop *desktop = SP_ACTIVE_DESKTOP;
- if (desktop)
- desktop->setWaitingCursor();
+ SPDesktop *olddesktop = SP_ACTIVE_DESKTOP;
+ if (olddesktop)
+ olddesktop->setWaitingCursor();
SPViewWidget *dtw = sp_desktop_widget_new(sp_document_namedview(doc, NULL)); // TODO this will trigger broken link warnings, etc.
g_return_val_if_fail(dtw != NULL, NULL);
sp_create_window(dtw, TRUE);
- desktop = static_cast<SPDesktop *>(dtw->view);
+ SPDesktop* desktop = static_cast<SPDesktop *>(dtw->view);
doc->doUnref();
@@ -166,6 +166,8 @@ SPDesktop *sp_file_new(const std::string &templ)
Inkscape::Extension::Dbus::dbus_init_desktop_interface(desktop);
#endif
+ if (olddesktop)
+ olddesktop->clearWaitingCursor();
if (desktop)
desktop->clearWaitingCursor();
@@ -1087,9 +1089,9 @@ void sp_import_document(SPDesktop *desktop, SPDocument *clipdoc, bool in_place)
Inkscape::Selection *selection = sp_desktop_selection(desktop);
selection->setReprList(pasted_objects);
- // invers apply parent transform
+ // Apply inverse of parent transform
Geom::Affine doc2parent = SP_ITEM(desktop->currentLayer())->i2doc_affine().inverse();
- sp_selection_apply_affine(selection, desktop->dt2doc() * doc2parent * desktop->doc2dt(), true, false);
+ sp_selection_apply_affine(selection, desktop->dt2doc() * doc2parent * desktop->doc2dt(), true, false, false);
// Update (among other things) all curves in paths, for bounds() to work
target_document->ensureUpToDate();
@@ -1226,7 +1228,7 @@ file_import(SPDocument *in_doc, const Glib::ustring &uri,
// c2p is identity matrix at this point unless ensureUpToDate is called
doc->ensureUpToDate();
Geom::Affine affine = doc->getRoot()->c2p * SP_ITEM(place_to_insert)->i2doc_affine().inverse();
- sp_selection_apply_affine(selection, desktop->dt2doc() * affine * desktop->doc2dt(), true, false);
+ sp_selection_apply_affine(selection, desktop->dt2doc() * affine * desktop->doc2dt(), true, false, false);
// move to mouse pointer
{