diff options
| author | Krzysztof Kosi??ski <tweenk.pl@gmail.com> | 2010-01-14 08:42:20 +0000 |
|---|---|---|
| committer | Krzysztof KosiĆski <tweenk.pl@gmail.com> | 2010-01-14 08:42:20 +0000 |
| commit | dd3076a51d8a53223c771a39fa5f976db0c85af5 (patch) | |
| tree | a77295c5911f20bb9e4dd1f513847ff603ba1cc8 /src/ui/tool/multi-path-manipulator.cpp | |
| parent | * Merge from trunk (diff) | |
| download | inkscape-dd3076a51d8a53223c771a39fa5f976db0c85af5.tar.gz inkscape-dd3076a51d8a53223c771a39fa5f976db0c85af5.zip | |
Implement segment weld to make segment join similar to node join
(bzr r8846.2.12)
Diffstat (limited to 'src/ui/tool/multi-path-manipulator.cpp')
| -rw-r--r-- | src/ui/tool/multi-path-manipulator.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/ui/tool/multi-path-manipulator.cpp b/src/ui/tool/multi-path-manipulator.cpp index 2cc9bc97b..3ae7e4d24 100644 --- a/src/ui/tool/multi-path-manipulator.cpp +++ b/src/ui/tool/multi-path-manipulator.cpp @@ -304,15 +304,10 @@ void MultiPathManipulator::deleteNodes(bool keep_shape) } /** Join selected endpoints to create segments. */ -void MultiPathManipulator::joinSegment() +void MultiPathManipulator::joinSegments() { IterPairList joins; find_join_iterators(_selection, joins); - if (joins.empty()) { - _desktop->messageStack()->flash(Inkscape::WARNING_MESSAGE, - _("There must be at least 2 endnodes in selection")); - return; - } for (IterPairList::iterator i = joins.begin(); i != joins.end(); ++i) { bool same_path = prepare_join(*i); @@ -328,6 +323,9 @@ void MultiPathManipulator::joinSegment() } } + if (joins.empty()) { + invokeForAll(&PathManipulator::weldSegments); + } _doneWithCleanup("Join segments"); } @@ -421,7 +419,7 @@ bool MultiPathManipulator::event(GdkEvent *event) return true; } if (held_only_alt(event->key)) { - joinSegment(); + joinSegments(); return true; } break; |
