From 7d03e020cb353dbc006a7f3020375dd7005aa760 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Cenoz Date: Tue, 10 May 2016 12:43:38 +0200 Subject: Fix a bug on Pen tool when use bend path as option and the clipboard has something diferent than shape, path or group (bzr r14882) --- src/ui/tools/freehand-base.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/ui/tools') diff --git a/src/ui/tools/freehand-base.cpp b/src/ui/tools/freehand-base.cpp index 613857626..c98ecb686 100644 --- a/src/ui/tools/freehand-base.cpp +++ b/src/ui/tools/freehand-base.cpp @@ -43,6 +43,7 @@ #include "snap.h" #include "sp-path.h" #include "sp-use.h" +#include "sp-item-group.h" #include "sp-namedview.h" #include "live_effects/lpe-powerstroke.h" #include "style.h" @@ -432,7 +433,7 @@ static void spdc_check_for_and_apply_waiting_LPE(FreehandBase *dc, SPItem *item, if(cm->paste(SP_ACTIVE_DESKTOP,true) == true){ gchar const *svgd = item->getRepr()->attribute("d"); bend_item = dc->selection->singleItem(); - if(bend_item){ + if(bend_item && (SP_IS_SHAPE(bend_item) || SP_IS_GROUP(bend_item))){ bend_item->moveTo(item,false); bend_item->transform.setTranslation(Geom::Point()); spdc_apply_bend_shape(svgd, dc, bend_item); @@ -440,9 +441,11 @@ static void spdc_check_for_and_apply_waiting_LPE(FreehandBase *dc, SPItem *item, shape = BEND_CLIPBOARD; } else { + bend_item = NULL; shape = NONE; } } else { + bend_item = NULL; shape = NONE; } break; -- cgit v1.2.3 From 1bc3cd7e631ba1a7480e77c0ce57e8b7a5cae9c9 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Cenoz Date: Sat, 21 May 2016 20:22:10 +0200 Subject: Remove duplicated code (bzr r14908) --- src/ui/tools/node-tool.cpp | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src/ui/tools') diff --git a/src/ui/tools/node-tool.cpp b/src/ui/tools/node-tool.cpp index 4149403ea..23aaf6bb1 100644 --- a/src/ui/tools/node-tool.cpp +++ b/src/ui/tools/node-tool.cpp @@ -164,11 +164,6 @@ NodeTool::~NodeTool() { if (this->helperpath_tmpitem) { this->desktop->remove_temporary_canvasitem(this->helperpath_tmpitem); } - - if (this->helperpath_tmpitem) { - this->desktop->remove_temporary_canvasitem(this->helperpath_tmpitem); - } - this->_selection_changed_connection.disconnect(); //this->_selection_modified_connection.disconnect(); this->_mouseover_changed_connection.disconnect(); -- cgit v1.2.3