From 6777466eda0b6952746a7bfb443d5e773857185a Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Sat, 3 Aug 2013 23:39:12 +0200 Subject: reduce variable scope (bzr r12464) --- src/shape-editor.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/shape-editor.cpp') diff --git a/src/shape-editor.cpp b/src/shape-editor.cpp index f2339770c..71018d89b 100644 --- a/src/shape-editor.cpp +++ b/src/shape-editor.cpp @@ -46,15 +46,13 @@ ShapeEditor::~ShapeEditor() { } void ShapeEditor::unset_item(SubType type, bool keep_knotholder) { - Inkscape::XML::Node *old_repr = NULL; - switch (type) { case SH_NODEPATH: // defunct break; case SH_KNOTHOLDER: if (this->knotholder) { - old_repr = this->knotholder->repr; + Inkscape::XML::Node *old_repr = this->knotholder->repr; if (old_repr && old_repr == knotholder_listener_attached_for) { sp_repr_remove_listener_by_data(old_repr, this); Inkscape::GC::release(old_repr); -- cgit v1.2.3 From 09c1fee60bcd713fe66178021053d59e3f649660 Mon Sep 17 00:00:00 2001 From: Matthew Petroff Date: Sat, 14 Sep 2013 16:37:55 -0400 Subject: Fix bug with tool handles during document unit change. (bzr r12475.1.17) --- src/shape-editor.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/shape-editor.cpp') diff --git a/src/shape-editor.cpp b/src/shape-editor.cpp index 71018d89b..59d43f24c 100644 --- a/src/shape-editor.cpp +++ b/src/shape-editor.cpp @@ -35,6 +35,8 @@ using Inkscape::createKnotHolder; +bool ShapeEditor::_blockSetItem = false; + ShapeEditor::ShapeEditor(SPDesktop *dt) { this->desktop = dt; this->knotholder = NULL; @@ -169,6 +171,10 @@ static Inkscape::XML::NodeEventVector shapeeditor_repr_events = { void ShapeEditor::set_item(SPItem *item, SubType type, bool keep_knotholder) { + if (_blockSetItem) { + return; + } + // this happens (and should only happen) when for an LPEItem having both knotholder and // nodepath the knotholder is adapted; in this case we don't want to delete the knotholder // since this freezes the handles -- cgit v1.2.3 From 3aa344e9a40d97db7cd5a89671896bab70da33a4 Mon Sep 17 00:00:00 2001 From: Markus Engel Date: Sun, 2 Mar 2014 01:31:12 +0100 Subject: Added some consts. Turned functions to member functions. (bzr r13089) --- src/shape-editor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/shape-editor.cpp') diff --git a/src/shape-editor.cpp b/src/shape-editor.cpp index 59d43f24c..bf53e8bc3 100644 --- a/src/shape-editor.cpp +++ b/src/shape-editor.cpp @@ -235,11 +235,11 @@ bool ShapeEditor::has_selection() { /** * Returns true if this ShapeEditor has a knot above which the mouse currently hovers. */ -bool ShapeEditor::knot_mouseover() -{ +bool ShapeEditor::knot_mouseover() const { if (this->knotholder) { return knotholder->knot_mouseover(); } + return false; } -- cgit v1.2.3