summaryrefslogtreecommitdiffstats
path: root/src/shape-editor.cpp
diff options
context:
space:
mode:
authorbulia byak <buliabyak@gmail.com>2008-07-20 16:36:22 +0000
committerbuliabyak <buliabyak@users.sourceforge.net>2008-07-20 16:36:22 +0000
commit2d7d1528cc81b11067013e8a0830538a03d60220 (patch)
tree2b608aa7f099e1117dd73479e44a5ad0d0d70968 /src/shape-editor.cpp
parent* [INTL: sk] (trunk) Updated Slovak translation (diff)
downloadinkscape-2d7d1528cc81b11067013e8a0830538a03d60220.tar.gz
inkscape-2d7d1528cc81b11067013e8a0830538a03d60220.zip
fix stupid crash, make get_item const
(bzr r6369)
Diffstat (limited to 'src/shape-editor.cpp')
-rw-r--r--src/shape-editor.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/shape-editor.cpp b/src/shape-editor.cpp
index 77419d1d1..27e1dd399 100644
--- a/src/shape-editor.cpp
+++ b/src/shape-editor.cpp
@@ -130,8 +130,8 @@ void ShapeEditor::decrement_local_change (SubType type) {
}
}
-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()) {
@@ -140,7 +140,7 @@ SPItem *ShapeEditor::get_item (SubType type) {
break;
case SH_KNOTHOLDER:
if (this->has_knotholder()) {
- item = this->nodepath->item;
+ item = this->knotholder->getItem();
}
break;
}
@@ -329,8 +329,8 @@ void ShapeEditor::reset_item (SubType type, bool keep_knotholder)
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;
}
@@ -350,7 +350,7 @@ bool ShapeEditor::is_over_stroke (NR::Point event_p, bool remember) {
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);