summaryrefslogtreecommitdiffstats
path: root/src/ui/tool/multi-path-manipulator.cpp
diff options
context:
space:
mode:
authorAndrew Higginson <at.higginson@gmail.com>2011-12-27 21:04:47 +0000
committerAndrew <at.higginson@gmail.com>2011-12-27 21:04:47 +0000
commit80960b623a99aae1402ab651b2974ef544ed3b03 (patch)
treeba49d42c2789e9e11f805e2d5263e10f9fedeef8 /src/ui/tool/multi-path-manipulator.cpp
parenttry to fix bug (diff)
parentGDL: Cherry-pick upstream patch 73852 (2011-03-23) - Add missing return value. (diff)
downloadinkscape-80960b623a99aae1402ab651b2974ef544ed3b03.tar.gz
inkscape-80960b623a99aae1402ab651b2974ef544ed3b03.zip
merged with trunk so I can build again...
(bzr r10092.1.36)
Diffstat (limited to 'src/ui/tool/multi-path-manipulator.cpp')
-rw-r--r--src/ui/tool/multi-path-manipulator.cpp41
1 files changed, 24 insertions, 17 deletions
diff --git a/src/ui/tool/multi-path-manipulator.cpp b/src/ui/tool/multi-path-manipulator.cpp
index 082ac194b..2316058ed 100644
--- a/src/ui/tool/multi-path-manipulator.cpp
+++ b/src/ui/tool/multi-path-manipulator.cpp
@@ -1,5 +1,6 @@
-/** @file
- * Multi path manipulator - implementation
+/**
+ * @file
+ * Multi path manipulator - implementation.
*/
/* Authors:
* Krzysztof KosiƄski <tweenk.pl@gmail.com>
@@ -149,9 +150,11 @@ void MultiPathManipulator::cleanup()
}
}
-/** @brief Change the set of items to edit.
+/**
+ * Change the set of items to edit.
*
- * This method attempts to preserve as much of the state as possible. */
+ * This method attempts to preserve as much of the state as possible.
+ */
void MultiPathManipulator::setItems(std::set<ShapeRecord> const &s)
{
std::set<ShapeRecord> shapes(s);
@@ -399,21 +402,21 @@ void MultiPathManipulator::joinNodes()
invokeForAll(&PathManipulator::weldNodes, preserve_pos);
}
- _doneWithCleanup(_("Join nodes"));
+ _doneWithCleanup(_("Join nodes"), true);
}
void MultiPathManipulator::breakNodes()
{
if (_selection.empty()) return;
invokeForAll(&PathManipulator::breakNodes);
- _done(_("Break nodes"));
+ _done(_("Break nodes"), true);
}
void MultiPathManipulator::deleteNodes(bool keep_shape)
{
if (_selection.empty()) return;
invokeForAll(&PathManipulator::deleteNodes, keep_shape);
- _doneWithCleanup(_("Delete nodes"));
+ _doneWithCleanup(_("Delete nodes"), true);
}
/** Join selected endpoints to create segments. */
@@ -439,14 +442,14 @@ void MultiPathManipulator::joinSegments()
if (joins.empty()) {
invokeForAll(&PathManipulator::weldSegments);
}
- _doneWithCleanup("Join segments");
+ _doneWithCleanup("Join segments", true);
}
void MultiPathManipulator::deleteSegments()
{
if (_selection.empty()) return;
invokeForAll(&PathManipulator::deleteSegments);
- _doneWithCleanup("Delete segments");
+ _doneWithCleanup("Delete segments", true);
}
void MultiPathManipulator::alignNodes(Geom::Dim2 d)
@@ -507,20 +510,24 @@ void MultiPathManipulator::showPathDirection(bool show)
_show_path_direction = show;
}
-/** @brief Set live outline update status
+/**
+ * Set live outline update status.
* When set to true, outline will be updated continuously when dragging
* or transforming nodes. Otherwise it will only update when changes are committed
- * to XML. */
+ * to XML.
+ */
void MultiPathManipulator::setLiveOutline(bool set)
{
invokeForAll(&PathManipulator::setLiveOutline, set);
_live_outline = set;
}
-/** @brief Set live object update status
+/**
+ * Set live object update status.
* When set to true, objects will be updated continuously when dragging
* or transforming nodes. Otherwise they will only update when changes are committed
- * to XML. */
+ * to XML.
+ */
void MultiPathManipulator::setLiveObjects(bool set)
{
invokeForAll(&PathManipulator::setLiveObjects, set);
@@ -794,17 +801,17 @@ void MultiPathManipulator::_commit(CommitEvent cps)
}
/** Commits changes to XML and adds undo stack entry. */
-void MultiPathManipulator::_done(gchar const *reason) {
- invokeForAll(&PathManipulator::update);
+void MultiPathManipulator::_done(gchar const *reason, bool alert_LPE) {
+ invokeForAll(&PathManipulator::update, alert_LPE);
invokeForAll(&PathManipulator::writeXML);
DocumentUndo::done(sp_desktop_document(_desktop), SP_VERB_CONTEXT_NODE, reason);
signal_coords_changed.emit();
}
/** Commits changes to XML, adds undo stack entry and removes empty manipulators. */
-void MultiPathManipulator::_doneWithCleanup(gchar const *reason) {
+void MultiPathManipulator::_doneWithCleanup(gchar const *reason, bool alert_LPE) {
_changed.block();
- _done(reason);
+ _done(reason, alert_LPE);
cleanup();
_changed.unblock();
}