summaryrefslogtreecommitdiffstats
path: root/src/shape-editor.cpp
diff options
context:
space:
mode:
authorMaximilian Albert <maximilian.albert@gmail.com>2008-06-16 15:45:47 +0000
committercilix42 <cilix42@users.sourceforge.net>2008-06-16 15:45:47 +0000
commit5105a8b365bd0a62f3c8e89fdb65614d83847459 (patch)
tree0ccbdd60d9ff3215262f873e9c30ecfe822eab51 /src/shape-editor.cpp
parentFirst step towards making helper paths for LPE items work better (diff)
downloadinkscape-5105a8b365bd0a62f3c8e89fdb65614d83847459.tar.gz
inkscape-5105a8b365bd0a62f3c8e89fdb65614d83847459.zip
Second step: try to make helper curves respond faster (don't recreate/delete the temporary canvasitems each time the selection is modified); better use of flash paths
(bzr r5955)
Diffstat (limited to 'src/shape-editor.cpp')
-rw-r--r--src/shape-editor.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/shape-editor.cpp b/src/shape-editor.cpp
index b975d3f79..d5712525a 100644
--- a/src/shape-editor.cpp
+++ b/src/shape-editor.cpp
@@ -192,13 +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));
+ Inkscape::LivePathEffect::Effect *lpe = sp_lpe_item_get_current_lpe(lpeitem);
+ if (!(lpe && lpe->isVisible() && lpe->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 if (lpe && lpe->isVisible() && lpe->showOrigPath()) {
+ sp_lpe_item_add_temporary_canvasitems(lpeitem, desktop);
}
}