From 01d2e3d96b8e88f2f7cf1bcdd0e5ca3d55c98ece Mon Sep 17 00:00:00 2001 From: Claudio Valerio Date: Thu, 27 Sep 2012 09:56:14 +0200 Subject: [PATCH] fixed issue with strokes made using a pen --- src/domain/UBGraphicsScene.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/domain/UBGraphicsScene.cpp b/src/domain/UBGraphicsScene.cpp index b36c1e13..621dc9a4 100644 --- a/src/domain/UBGraphicsScene.cpp +++ b/src/domain/UBGraphicsScene.cpp @@ -629,8 +629,8 @@ bool UBGraphicsScene::inputDeviceRelease() if (mCurrentStroke && mCurrentStroke->polygons().empty()){ delete mCurrentStroke; + mCurrentStroke = NULL; } - mCurrentStroke = NULL; return accepted; } @@ -2302,10 +2302,12 @@ void UBGraphicsScene::setToolCursor(int tool) if (mCurrentStroke && mCurrentStroke->polygons().empty()){ delete mCurrentStroke; + mCurrentStroke = NULL; } - mCurrentStroke = NULL; + } -void UBGraphicsScene::initStroke(){ +void UBGraphicsScene::initStroke() +{ mCurrentStroke = new UBGraphicsStroke(); }