From: speleo3 Date: Sun, 17 May 2009 15:53:51 +0000 (+0000) Subject: remove temporary prefs hack X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=84ff7164a7daa94979f798475bb938a6fb1efb42;p=inkscape.git remove temporary prefs hack --- diff --git a/src/file.cpp b/src/file.cpp index 80b424f5d..136d946b9 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -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); } } diff --git a/src/interface.cpp b/src/interface.cpp index e99564c0f..933d407a3 100644 --- a/src/interface.cpp +++ b/src/interface.cpp @@ -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);