diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2010-07-28 21:41:55 +0000 |
|---|---|---|
| committer | Johan Engelen <goejendaagh@zonnet.nl> | 2010-07-28 21:41:55 +0000 |
| commit | a5a5859cfebd3c5652f6163a3826f49765573d3e (patch) | |
| tree | 8697d28f0beaead22639ff537cd5b2a615eee06b /src/live_effects/parameter/powerstrokepointarray.cpp | |
| parent | Fix rendering of "plain" SVG text. (diff) | |
| download | inkscape-a5a5859cfebd3c5652f6163a3826f49765573d3e.tar.gz inkscape-a5a5859cfebd3c5652f6163a3826f49765573d3e.zip | |
powerstroke: ctrl+click inserts new stroke knot. BUGGY. reselect object after adding stroke knot
(bzr r9666)
Diffstat (limited to 'src/live_effects/parameter/powerstrokepointarray.cpp')
| -rw-r--r-- | src/live_effects/parameter/powerstrokepointarray.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/live_effects/parameter/powerstrokepointarray.cpp b/src/live_effects/parameter/powerstrokepointarray.cpp index 49ef05319..99c327207 100644 --- a/src/live_effects/parameter/powerstrokepointarray.cpp +++ b/src/live_effects/parameter/powerstrokepointarray.cpp @@ -124,9 +124,17 @@ PowerStrokePointArrayParamKnotHolderEntity::knot_get() } 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 |
