summaryrefslogtreecommitdiffstats
path: root/src/shape-editor.cpp
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2008-02-27 09:39:45 +0000
committerjohanengelen <johanengelen@users.sourceforge.net>2008-02-27 09:39:45 +0000
commit65cbb55acda471b70268599a8f276001b121c9e1 (patch)
treedcea3d6a6459d65450ba12ab482f5261b19e8695 /src/shape-editor.cpp
parentConvert remaining old RegisteredWdg's to RegisteredWidget's. Removed Register... (diff)
downloadinkscape-65cbb55acda471b70268599a8f276001b121c9e1.tar.gz
inkscape-65cbb55acda471b70268599a8f276001b121c9e1.zip
* (when debug macro is defined) call ShapeEditor function to on-canvas edit point lpe parameters. This function still needs to be implemented.
* put forward declarations in lpe parameters to decrease recompile times (bzr r4888)
Diffstat (limited to 'src/shape-editor.cpp')
-rw-r--r--src/shape-editor.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/shape-editor.cpp b/src/shape-editor.cpp
index fbf42eaca..b8eaca7a7 100644
--- a/src/shape-editor.cpp
+++ b/src/shape-editor.cpp
@@ -212,15 +212,15 @@ void ShapeEditor::set_item(SPItem *item) {
/** Please note that this function only works for path parameters.
* All other parameters probably will crash Inkscape!
-* Fortunately, there are no other on-canvas edittable objects at this moment :)
*/
-void ShapeEditor::set_item_livepatheffect_parameter(SPItem *item, SPObject *lpeobject, const char * key) {
+void ShapeEditor::set_item_lpe_path_parameter(SPItem *item, SPObject *lpeobject, const char * key) {
unset_item();
this->grab_node = -1;
if (lpeobject) {
+ // FIXME ? just setting knotholder to NULL... not necessary to delete it ?
this->knotholder = NULL; // it's a path, no special knotholder needed.
this->nodepath = sp_nodepath_new( desktop, lpeobject,
(prefs_get_int_attribute("tools.nodes", "show_handles", 1) != 0),
@@ -238,6 +238,14 @@ void ShapeEditor::set_item_livepatheffect_parameter(SPItem *item, SPObject *lpeo
}
}
+/** Please note that this function only works for point parameters.
+* All other parameters probably will crash Inkscape!
+*/
+void ShapeEditor::set_item_lpe_point_parameter(SPItem */*item*/, SPObject */*lpeobject*/, const char * /*key*/) {
+ g_message("ShapeEditor::set_item_lpe_point_parameter has not been implemented yet!");
+}
+
+
/** FIXME: think about this. Is this thing only called when the item needs to be updated?
Why not make a reload function in NodePath and in KnotHolder? */
void ShapeEditor::reset_item ()
@@ -246,7 +254,7 @@ void ShapeEditor::reset_item ()
SPItem * item = this->nodepath->item;
SPObject *obj = this->nodepath->object;
char * key = g_strdup(this->nodepath->repr_key);
- set_item_livepatheffect_parameter(item, obj, key);
+ set_item_lpe_path_parameter(item, obj, key); // the above checks for nodepath, so it is indeed a path that we are editing
g_free(key);
} else {
SPItem * item = get_item();