Code

remove temporary prefs hack
authorspeleo3 <speleo3@users.sourceforge.net>
Sun, 17 May 2009 15:53:51 +0000 (15:53 +0000)
committerspeleo3 <speleo3@users.sourceforge.net>
Sun, 17 May 2009 15:53:51 +0000 (15:53 +0000)
src/file.cpp
src/interface.cpp

index 80b424f5d698bf2051dd1a1abb7595ddddf28aa7..136d946b9b0bb6a2ec7c81e183f9d036bb31b75d 100644 (file)
@@ -1017,19 +1017,14 @@ file_import(SPDocument *in_doc, const Glib::ustring &uri,
             Geom::Matrix affine = SP_ROOT(SP_DOCUMENT_ROOT(doc))->c2p * sp_item_i2doc_affine(SP_ITEM(place_to_insert)).inverse();
             sp_selection_apply_affine(selection, desktop->dt2doc() * affine * desktop->doc2dt(), true, false);
 
-            // To move the imported object, we must temporarily set the "transform pattern with
-            // object" option.
+            // move to mouse pointer
             {
-                Inkscape::Preferences *prefs = Inkscape::Preferences::get();
-                bool const saved_pref = prefs->getBool("/options/transform/pattern", true);
-                prefs->setBool("/options/transform/pattern", true);
                 sp_document_ensure_up_to_date(sp_desktop_document(desktop));
                 Geom::OptRect sel_bbox = selection->bounds();
                 if (sel_bbox) {
                     Geom::Point m( desktop->point() - sel_bbox->midpoint() );
-                    sp_selection_move_relative(selection, m);
+                    sp_selection_move_relative(selection, m, false);
                 }
-                prefs->setBool("/options/transform/pattern", saved_pref);
             }
         }
 
index e99564c0f571ad58d207323733f43a1a7223d27c..933d407a367db240a6510a38bd01356d83673518 100644 (file)
@@ -1374,19 +1374,15 @@ sp_ui_drag_data_received(GtkWidget *widget,
 
             Inkscape::Selection *selection = sp_desktop_selection(desktop);
             selection->set(SP_ITEM(new_obj));
-            // To move the imported object, we must temporarily set the "transform pattern with
-            // object" option.
+
+            // move to mouse pointer
             {
-                Inkscape::Preferences *prefs = Inkscape::Preferences::get();
-                bool const saved_pref = prefs->getBool("/options/transform/pattern", true);
-                prefs->setBool("/options/transform/pattern", true);
                 sp_document_ensure_up_to_date(sp_desktop_document(desktop));
                 Geom::OptRect sel_bbox = selection->bounds();
                 if (sel_bbox) {
                     Geom::Point m( desktop->point() - sel_bbox->midpoint() );
-                    sp_selection_move_relative(selection, m);
+                    sp_selection_move_relative(selection, m, false);
                 }
-                prefs->setBool("/options/transform/pattern", saved_pref);
             }
 
             Inkscape::GC::release(newgroup);