summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 82c3c2e)
raw | patch | inline | side by side (parent: 82c3c2e)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Sun, 20 Jul 2008 16:36:22 +0000 (16:36 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Sun, 20 Jul 2008 16:36:22 +0000 (16:36 +0000) |
src/shape-editor.cpp | patch | blob | history | |
src/shape-editor.h | patch | blob | history |
diff --git a/src/shape-editor.cpp b/src/shape-editor.cpp
index 77419d1d10393a6cc17a06614f5292a7c267bbcb..27e1dd399fbee31c23725da7a837c7056b9ca53a 100644 (file)
--- a/src/shape-editor.cpp
+++ b/src/shape-editor.cpp
}
}
-SPItem *ShapeEditor::get_item (SubType type) {
- SPItem *item = NULL;
+const SPItem *ShapeEditor::get_item (SubType type) {
+ const SPItem *item = NULL;
switch (type) {
case SH_NODEPATH:
if (this->has_nodepath()) {
break;
case SH_KNOTHOLDER:
if (this->has_knotholder()) {
- item = this->nodepath->item;
+ item = this->knotholder->getItem();
}
break;
}
break;
case SH_KNOTHOLDER:
if (this->knotholder) {
- SPItem * item = get_item(SH_KNOTHOLDER);
- set_item(item, SH_KNOTHOLDER, keep_knotholder);
+ const SPItem * item = get_item(SH_KNOTHOLDER);
+ set_item((SPItem *) item, SH_KNOTHOLDER, keep_knotholder);
}
break;
}
if (!this->nodepath)
return false; // no stroke in knotholder
- SPItem *item = get_item(SH_NODEPATH);
+ const SPItem *item = get_item(SH_NODEPATH);
//Translate click point into proper coord system
this->curvepoint_doc = desktop->w2d(event_p);
diff --git a/src/shape-editor.h b/src/shape-editor.h
index 9181027614aed152e658d941caf8fc3fe283d3c2..2a6da68c3b6f9f72622a6c6649fd9e4e1db54f51 100644 (file)
--- a/src/shape-editor.h
+++ b/src/shape-editor.h
void reset_item (SubType type, bool keep_knotholder = true);
void unset_item (SubType type, bool keep_knotholder = false);
- SPItem *get_item (SubType type);
+ const SPItem *get_item (SubType type);
bool has_nodepath ();
bool has_knotholder ();