summaryrefslogtreecommitdiffstats
path: root/src/nodepath.cpp
diff options
context:
space:
mode:
authorbulia byak <buliabyak@gmail.com>2006-05-16 02:39:05 +0000
committerbuliabyak <buliabyak@users.sourceforge.net>2006-05-16 02:39:05 +0000
commit2c4a12df266ae54394936a5d22e8ad3e0317ae02 (patch)
tree27f03878bbb0e3333de3beeb7f503de5d3412bca /src/nodepath.cpp
parentAdd Pedro to the excludes, at least until after the release (diff)
downloadinkscape-2c4a12df266ae54394936a5d22e8ad3e0317ae02.tar.gz
inkscape-2c4a12df266ae54394936a5d22e8ad3e0317ae02.zip
show handles toggle
(bzr r850)
Diffstat (limited to 'src/nodepath.cpp')
-rw-r--r--src/nodepath.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/nodepath.cpp b/src/nodepath.cpp
index 4b9559737..1ffef1880 100644
--- a/src/nodepath.cpp
+++ b/src/nodepath.cpp
@@ -137,7 +137,7 @@ static Inkscape::NodePath::Node *active_node = NULL;
/**
* \brief Creates new nodepath from item
*/
-Inkscape::NodePath::Path *sp_nodepath_new(SPDesktop *desktop, SPItem *item)
+Inkscape::NodePath::Path *sp_nodepath_new(SPDesktop *desktop, SPItem *item, bool show_handles)
{
Inkscape::XML::Node *repr = SP_OBJECT(item)->repr;
@@ -186,6 +186,7 @@ Inkscape::NodePath::Path *sp_nodepath_new(SPDesktop *desktop, SPItem *item)
np->nodeContext = NULL; //Let the context that makes this set it
np->livarot_path = NULL;
np->local_change = 0;
+ np->show_handles = show_handles;
// we need to update item's transform from the repr here,
// because they may be out of sync when we respond
@@ -1336,6 +1337,9 @@ static void sp_node_update_handles(Inkscape::NodePath::Node *node, bool fire_mov
if (node->n.other->selected) show_handles = TRUE;
}
+ if (node->subpath->nodepath->show_handles == false)
+ show_handles = FALSE;
+
sp_node_update_handle(node, -1, show_handles, fire_move_signals);
sp_node_update_handle(node, 1, show_handles, fire_move_signals);
}
@@ -1364,6 +1368,16 @@ static void sp_nodepath_update_handles(Inkscape::NodePath::Path *nodepath)
}
}
+void
+sp_nodepath_show_handles(bool show)
+{
+ Inkscape::NodePath::Path *nodepath = sp_nodepath_current();
+ if (nodepath == NULL) return;
+
+ nodepath->show_handles = show;
+ sp_nodepath_update_handles(nodepath);
+}
+
/**
* Adds all selected nodes in nodepath to list.
*/