summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 104ab56)
raw | patch | inline | side by side (parent: 104ab56)
author | cilix42 <cilix42@users.sourceforge.net> | |
Wed, 16 Jan 2008 09:36:32 +0000 (09:36 +0000) | ||
committer | cilix42 <cilix42@users.sourceforge.net> | |
Wed, 16 Jan 2008 09:36:32 +0000 (09:36 +0000) |
diff --git a/src/box3d.cpp b/src/box3d.cpp
index 4aca24c4260add33cda3e4d6c69508cabac91b9a..9faf47c7c0d2895f04d9ddc671b3bae700f0f974 100644 (file)
--- a/src/box3d.cpp
+++ b/src/box3d.cpp
box3d_push_back_corner_pair(box, pts, 3, 7);
sp_guide_pt_pairs_to_guides(doc, pts);
-
- SP_OBJECT(box)->deleteObject(true);
}
/*
index 4cf34e2c565e8f84297ae574995e3797486486b2..381f45e0ddb736ad5053d1fbbb76c8cd73c504c3 100644 (file)
_("Objects to marker"));
}
-static void sp_selection_to_guides_recursive(SPItem *item) {
+static void sp_selection_to_guides_recursive(SPItem *item, bool deleteitem) {
if (SP_IS_GROUP(item) && !SP_IS_BOX3D(item)) {
for (GSList *i = sp_item_group_item_list (SP_GROUP(item)); i != NULL; i = i->next) {
- sp_selection_to_guides_recursive(SP_ITEM(i->data));
+ sp_selection_to_guides_recursive(SP_ITEM(i->data), deleteitem);
}
} else {
sp_item_convert_item_to_guides(item);
+
+ if (deleteitem) {
+ SP_OBJECT(item)->deleteObject(true);
+ }
}
}
return;
}
+ bool deleteitem = (prefs_get_int_attribute("tools", "cvg_keep_objects", 0) == 0);
+
for (GSList const *i = items; i != NULL; i = i->next) {
- sp_selection_to_guides_recursive(SP_ITEM(i->data));
+ sp_selection_to_guides_recursive(SP_ITEM(i->data), deleteitem);
}
sp_document_done (doc, SP_VERB_EDIT_SELECTION_2_GUIDES, _("Objects to guides"));
diff --git a/src/sp-item.cpp b/src/sp-item.cpp
index 63d20d32075ccbbbf1ad36c8ecdae4d05965f012..6b61e3246ebb1d6af7a800b443171a1ac7eca3c2 100644 (file)
--- a/src/sp-item.cpp
+++ b/src/sp-item.cpp
pts.push_back(std::make_pair(D.to_2geom(), A.to_2geom()));
sp_guide_pt_pairs_to_guides(SP_OBJECT_DOCUMENT(item), pts);
-
- SP_OBJECT(item)->deleteObject(true);
}
/*
diff --git a/src/sp-path.cpp b/src/sp-path.cpp
index a8e3ad6eebf74db53a4a0aacee145a22c2e186d0..4b897158b3074f36d0306fd08622e19a94fb5ab1 100644 (file)
--- a/src/sp-path.cpp
+++ b/src/sp-path.cpp
}
sp_guide_pt_pairs_to_guides(doc, pts);
-
- SP_OBJECT(path)->deleteObject(true);
}
/**
diff --git a/src/sp-rect.cpp b/src/sp-rect.cpp
index a26d415995d92911e917bc50f3fe2e583dac86b8..cf399d3241159e3d8daa6fc68f31f9c9fdedd67e 100644 (file)
--- a/src/sp-rect.cpp
+++ b/src/sp-rect.cpp
pts.push_back(std::make_pair(A4.to_2geom(), A1.to_2geom()));
sp_guide_pt_pairs_to_guides(doc, pts);
-
- SP_OBJECT(rect)->deleteObject(true);
}
/*
index ca25ad1270fec9d8c1cbab395936e6cc43aa8be2..b0c8bcb85fedda751d74d478977b364eef534472 100644 (file)
_page_tools.add_line( true, "", _t_bbox_geometric, "",
_("This bounding box includes only the bare path"));
+ _page_tools.add_group_header( _("Conversion to guides:"));
+ _t_cvg_keep_objects.init ( _("Keep objects after conversion to guides"), "tools", "cvg_keep_objects", false);
+ _page_tools.add_line( true, "", _t_cvg_keep_objects, "",
+ _("When converting an object to guides, don't delete the object after the conversion."));
+
_calligrapy_use_abs_size.init ( _("Width is in absolute units"), "tools.calligraphic", "abs_width", false);
_calligrapy_keep_selected.init ( _("Select new path"), "tools.calligraphic", "keep_selected", true);
_connector_ignore_text.init( _("Don't attach connectors to text objects"), "tools.connector", "ignoretext", true);
index 02f2c2da4ceae6f631a7463c1dc86be8aaafed18..15d6ee54e7eb661276337835b027ed94a81dab6d 100644 (file)
PrefRadioButton _t_sel_trans_obj, _t_sel_trans_outl, _t_sel_cue_none, _t_sel_cue_mark,
_t_sel_cue_box, _t_bbox_visual, _t_bbox_geometric;
+ PrefCheckButton _t_cvg_keep_objects;
PrefSpinButton _t_pencil_tolerance;