summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 196cca6)
raw | patch | inline | side by side (parent: 196cca6)
author | Krzysztof Kosiński <tweenk.pl@gmail.com> | |
Wed, 20 Jan 2010 15:31:22 +0000 (16:31 +0100) | ||
committer | Krzysztof Kosiński <tweenk.pl@gmail.com> | |
Wed, 20 Jan 2010 15:31:22 +0000 (16:31 +0100) |
src/ui/tool/multi-path-manipulator.cpp | patch | blob | history | |
src/ui/tool/path-manipulator.cpp | patch | blob | history | |
src/ui/tool/path-manipulator.h | patch | blob | history |
index 818bdaedcf4c35940c18c6e033e3f29ada4389b6..c05b71cd4f3b3993437f3651d25be8dc255861e2 100644 (file)
void MultiPathManipulator::reverseSubpaths()
{
- invokeForAll(&PathManipulator::reverseSubpaths);
- _done("Reverse selected subpaths");
+ if (_selection.empty()) {
+ invokeForAll(&PathManipulator::reverseSubpaths, false);
+ _done("Reverse subpaths");
+ } else {
+ invokeForAll(&PathManipulator::reverseSubpaths, true);
+ _done("Reverse selected subpaths");
+ }
}
void MultiPathManipulator::move(Geom::Point const &delta)
switch (shortcut_key(event->key)) {
case GDK_Insert:
case GDK_KP_Insert:
+ // Insert - insert nodes in the middle of selected segments
insertNodes();
return true;
case GDK_i:
case GDK_I:
if (held_only_shift(event->key)) {
+ // Shift+I - insert nodes (alternate keybinding for Mac keyboards
+ // that don't have the Insert key)
insertNodes();
return true;
}
case GDK_j:
case GDK_J:
if (held_only_shift(event->key)) {
+ // Shift+J - join nodes
joinNodes();
return true;
}
if (held_only_alt(event->key)) {
+ // Alt+J - join segments
joinSegments();
return true;
}
case GDK_b:
case GDK_B:
if (held_only_shift(event->key)) {
+ // Shift+B - break nodes
breakNodes();
return true;
}
case GDK_BackSpace:
if (held_shift(event->key)) break;
if (held_alt(event->key)) {
+ // Alt+Delete - delete segments
deleteSegments();
} else {
+ // Control+Delete - delete nodes
+ // Delete - delete nodes preserving shape
deleteNodes(!held_control(event->key));
}
return true;
case GDK_c:
case GDK_C:
if (held_only_shift(event->key)) {
+ // Shift+C - make nodes cusp
setNodeType(NODE_CUSP);
return true;
}
case GDK_s:
case GDK_S:
if (held_only_shift(event->key)) {
+ // Shift+S - make nodes smooth
setNodeType(NODE_SMOOTH);
return true;
}
case GDK_a:
case GDK_A:
if (held_only_shift(event->key)) {
+ // Shift+A - make nodes auto-smooth
setNodeType(NODE_AUTO);
return true;
}
case GDK_y:
case GDK_Y:
if (held_only_shift(event->key)) {
+ // Shift+Y - make nodes symmetric
setNodeType(NODE_SYMMETRIC);
return true;
}
case GDK_r:
case GDK_R:
if (held_only_shift(event->key)) {
+ // Shift+R - reverse subpaths
reverseSubpaths();
- break;
}
break;
default:
index 3be332b80a3a291cdf8a5a7ee541460cd2f7d6b4..e15349e06ea9f20c9900afdac44a6762cee267c8 100644 (file)
, _show_outline(false)
, _lpe_key(lpe_key)
{
- /* Because curve drag point is always created first, it does not cover nodes */
if (_lpe_key.empty()) {
_i2d_transform = sp_item_i2d_affine(SP_ITEM(path));
} else {
}
/** Reverse the subpaths that have anything selected. */
-void PathManipulator::reverseSubpaths()
+void PathManipulator::reverseSubpaths(bool selected_only)
{
for (SubpathList::iterator i = _subpaths.begin(); i != _subpaths.end(); ++i) {
- for (NodeList::iterator j = (*i)->begin(); j != (*i)->end(); ++j) {
- if (j->selected()) {
- (*i)->reverse();
- break; // continue with the next subpath
+ if (selected_only) {
+ for (NodeList::iterator j = (*i)->begin(); j != (*i)->end(); ++j) {
+ if (j->selected()) {
+ (*i)->reverse();
+ break; // continue with the next subpath
+ }
}
+ } else {
+ (*i)->reverse();
}
}
}
index 99e183b4530c656ecca0c4ab9ec929394ab974e6..1b4711bbaccb10b5a7da7f883c533bbf9e24f3ea 100644 (file)
void breakNodes();
void deleteNodes(bool keep_shape = true);
void deleteSegments();
- void reverseSubpaths();
+ void reverseSubpaths(bool selected_only);
void setSegmentType(SegmentType);
void showOutline(bool show);