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/freehand-base.cpp') 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