summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 66f63ca)
raw | patch | inline | side by side (parent: 66f63ca)
author | Krzysztof Kosiński <tweenk.pl@gmail.com> | |
Wed, 20 Jan 2010 20:33:32 +0000 (21:33 +0100) | ||
committer | Krzysztof Kosiński <tweenk.pl@gmail.com> | |
Wed, 20 Jan 2010 20:33:32 +0000 (21:33 +0100) |
src/ui/tool/curve-drag-point.cpp | patch | blob | history | |
src/ui/tool/curve-drag-point.h | patch | blob | history |
index 0d1183ebf92a8bde407d2bafe705097555b7cfdf..57ae776e3db6e387032b88784f698fc6c5580dce 100644 (file)
NodeList::iterator second = first.next();
if (!second) return false;
+ // insert nodes on Ctrl+Alt+click
+ if (held_control(*event) && held_alt(*event)) {
+ _insertNode(false);
+ return true;
+ }
+
if (held_shift(*event)) {
// if both nodes of the segment are selected, deselect;
// otherwise add to selection
bool CurveDragPoint::_doubleclickedHandler(GdkEventButton *event)
{
if (event->button != 1 || !first || !first.next()) return false;
+ _insertNode(true);
+ return true;
+}
+void CurveDragPoint::_insertNode(bool take_selection)
+{
// The purpose of this call is to make way for the just created node.
// Otherwise clicks on the new node would only work after the user moves the mouse a bit.
// PathManipulator will restore visibility when necessary.
setVisible(false);
NodeList::iterator inserted = _pm.subdivideSegment(first, _t);
- _pm._selection.clear();
+ if (take_selection) {
+ _pm._selection.clear();
+ }
_pm._selection.insert(inserted.ptr());
signal_update.emit();
_pm._commit(_("Add node"));
- return true;
}
Glib::ustring CurveDragPoint::_getTip(unsigned state)
index c9f32f7094e12288831ba0673cfe0c753373f1c4..51382615e74848291edcbd0bd206dc3cecc6ff17 100644 (file)
bool _clickedHandler(GdkEventButton *);
bool _doubleclickedHandler(GdkEventButton *);
void _ungrabbedHandler();
+ void _insertNode(bool take_selection);
double _t;
PathManipulator &_pm;
NodeList::iterator first;