summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e2dcdc0)
raw | patch | inline | side by side (parent: e2dcdc0)
author | johanengelen <johanengelen@users.sourceforge.net> | |
Mon, 2 Jun 2008 20:22:58 +0000 (20:22 +0000) | ||
committer | johanengelen <johanengelen@users.sourceforge.net> | |
Mon, 2 Jun 2008 20:22:58 +0000 (20:22 +0000) |
src/shape-editor.cpp | patch | blob | history |
diff --git a/src/shape-editor.cpp b/src/shape-editor.cpp
index 1d60671aad089cf5d0595e740504b6122e4b5b3e..49d8a2a1442b51297739151851908313f072f7ab 100644 (file)
--- a/src/shape-editor.cpp
+++ b/src/shape-editor.cpp
this->grab_node = -1;
if (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
+ 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));
+ }
+ } 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) {
this->nodepath->shape_editor = this;
}