diff options
| author | Maximilian Albert <maximilian.albert@gmail.com> | 2008-06-08 17:33:58 +0000 |
|---|---|---|
| committer | cilix42 <cilix42@users.sourceforge.net> | 2008-06-08 17:33:58 +0000 |
| commit | ad092a3d734fcec79273f957e8d86c7a9ceb767b (patch) | |
| tree | d1df1e2ac1ae259e7d8958990011fc3cba69d59a /src/shape-editor.cpp | |
| parent | Add 'Mode' label and icon for regular Bezier mode in pen/pencil toolbar (diff) | |
| download | inkscape-ad092a3d734fcec79273f957e8d86c7a9ceb767b.tar.gz inkscape-ad092a3d734fcec79273f957e8d86c7a9ceb767b.zip | |
Make knotholders for LPE items finally work; each effect can now overload the addKnotHolderHandles() method to add handles which control its parameters.
There is now also a virtual onKnotUngrabbed() method for each knotholder entity which can be used to do cleanup tasks (for LPE parameters it currently writes the value to SVG, although this should probably happen automatically)
(bzr r5855)
Diffstat (limited to 'src/shape-editor.cpp')
| -rw-r--r-- | src/shape-editor.cpp | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/src/shape-editor.cpp b/src/shape-editor.cpp index 3b892db03..9cfa83af1 100644 --- a/src/shape-editor.cpp +++ b/src/shape-editor.cpp @@ -192,19 +192,14 @@ void ShapeEditor::set_item(SPItem *item) { if (item) { if (SP_IS_LPE_ITEM(item)) { SPLPEItem *lpeitem = SP_LPE_ITEM(item); - if ( !sp_lpe_item_get_current_lpe(lpeitem) || // if returns NULL, the whole expression evaluates to true and C++ will not call the otherwise crashing 2 functions below - !sp_lpe_item_get_current_lpe(lpeitem)->isVisible() || - !sp_lpe_item_get_current_lpe(lpeitem)->providesKnotholder() ) - // only create nodepath if the item either doesn't have an LPE - // or the LPE is invisible or it doesn't provide a knotholder itself - { - this->nodepath = - sp_nodepath_new(desktop, item, (prefs_get_int_attribute("tools.nodes", "show_handles", 1) != 0)); + if (!sp_lpe_item_get_current_lpe(lpeitem) || // if returns NULL, the whole expression evaluates to true and C++ will not call the otherwise crashing 2 functions below + !sp_lpe_item_get_current_lpe(lpeitem)->isVisible() || + !sp_lpe_item_get_current_lpe(lpeitem)->providesKnotholder()) { + // only create nodepath if the item either doesn't have an LPE + // or the LPE is invisible or it doesn't provide a knotholder itself + this->nodepath = + sp_nodepath_new(desktop, item, (prefs_get_int_attribute("tools.nodes", "show_handles", 1) != 0)); } - } else { - // only create nodepath if the item either doesn't have an LPE: no fear the item cannot have an LPE - this->nodepath = - sp_nodepath_new(desktop, item, (prefs_get_int_attribute("tools.nodes", "show_handles", 1) != 0)); } if (this->nodepath) { |
