summaryrefslogtreecommitdiffstats
path: root/src/ui/tools/freehand-base.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2016-05-10 10:43:38 +0000
committerjabiertxof <info@marker.es>2016-05-10 10:43:38 +0000
commit7d03e020cb353dbc006a7f3020375dd7005aa760 (patch)
treef6ab089d87a568ad8a8ab13211e17ac74fa35f9d /src/ui/tools/freehand-base.cpp
parentGtk3: Use theme colors for ruler. Reduce size of spin buttons. (diff)
downloadinkscape-7d03e020cb353dbc006a7f3020375dd7005aa760.tar.gz
inkscape-7d03e020cb353dbc006a7f3020375dd7005aa760.zip
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)
Diffstat (limited to 'src/ui/tools/freehand-base.cpp')
-rw-r--r--src/ui/tools/freehand-base.cpp5
1 files changed, 4 insertions, 1 deletions
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;