summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 17a09ee)
raw | patch | inline | side by side (parent: 17a09ee)
author | Johan Engelen <goejendaagh@zonnet.nl> | |
Wed, 28 Jul 2010 21:41:55 +0000 (23:41 +0200) | ||
committer | Johan Engelen <goejendaagh@zonnet.nl> | |
Wed, 28 Jul 2010 21:41:55 +0000 (23:41 +0200) |
src/live_effects/parameter/powerstrokepointarray.cpp | patch | blob | history |
diff --git a/src/live_effects/parameter/powerstrokepointarray.cpp b/src/live_effects/parameter/powerstrokepointarray.cpp
index 49ef05319e22dcb9b7682ca323c3b00c62f3b1a1..99c32720729876935d9b32a38665720188287b57 100644 (file)
}
void
-PowerStrokePointArrayParamKnotHolderEntity::knot_click(guint /*state*/)
+PowerStrokePointArrayParamKnotHolderEntity::knot_click(guint state)
{
g_print ("This is the %d handle associated to parameter '%s'\n", _index, _pparam->param_key.c_str());
+
+ if (state & GDK_CONTROL_MASK) {
+ std::vector<Geom::Point> & vec = _pparam->_vector;
+ vec.insert(vec.begin() + _index, 1, vec.at(_index));
+ _pparam->param_set_and_write_new_value(vec);
+ g_print ("Added handle %d associated to parameter '%s'\n", _index, _pparam->param_key.c_str());
+ /// @todo this BUGS ! the knot stuff should be reloaded when adding a new node!
+ }
}
void