|
|
@ -432,13 +432,7 @@ bool UBGraphicsScene::inputDeviceMove(const QPointF& scenePos, const qreal& pres |
|
|
|
width /= UBApplication::boardController->systemScaleFactor(); |
|
|
|
width /= UBApplication::boardController->systemScaleFactor(); |
|
|
|
width /= UBApplication::boardController->currentZoom(); |
|
|
|
width /= UBApplication::boardController->currentZoom(); |
|
|
|
|
|
|
|
|
|
|
|
if (dc->mActiveRuler) |
|
|
|
if (currentTool == UBStylusTool::Line || dc->mActiveRuler) |
|
|
|
{ |
|
|
|
|
|
|
|
dc->mActiveRuler->DrawLine(position, width); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (currentTool == UBStylusTool::Line) |
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
if(NULL != mpLastPolygon && NULL != mCurrentStroke && mAddedItems.size() > 0){ |
|
|
|
if(NULL != mpLastPolygon && NULL != mCurrentStroke && mAddedItems.size() > 0){ |
|
|
|
UBCoreGraphicsScene::removeItemFromDeletion(mpLastPolygon); |
|
|
|
UBCoreGraphicsScene::removeItemFromDeletion(mpLastPolygon); |
|
|
@ -464,6 +458,9 @@ bool UBGraphicsScene::inputDeviceMove(const QPointF& scenePos, const qreal& pres |
|
|
|
position = newPosition; |
|
|
|
position = newPosition; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(dc->mActiveRuler){ |
|
|
|
|
|
|
|
dc->mActiveRuler->DrawLine(position, width); |
|
|
|
|
|
|
|
}else{ |
|
|
|
drawLineTo(position, width, UBDrawingController::drawingController()->stylusTool() == UBStylusTool::Line); |
|
|
|
drawLineTo(position, width, UBDrawingController::drawingController()->stylusTool() == UBStylusTool::Line); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -675,14 +672,14 @@ void UBGraphicsScene::drawLineTo(const QPointF &pEndPoint, const qreal &pWidth, |
|
|
|
mpLastPolygon = polygonItem; |
|
|
|
mpLastPolygon = polygonItem; |
|
|
|
mAddedItems.insert(polygonItem); |
|
|
|
mAddedItems.insert(polygonItem); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Here we add the item to the scene
|
|
|
|
|
|
|
|
addItem(polygonItem); |
|
|
|
|
|
|
|
|
|
|
|
if (mCurrentStroke) |
|
|
|
if (mCurrentStroke) |
|
|
|
{ |
|
|
|
{ |
|
|
|
polygonItem->setStroke(mCurrentStroke); |
|
|
|
polygonItem->setStroke(mCurrentStroke); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Here we add the item to the scene
|
|
|
|
|
|
|
|
addItem(polygonItem); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mPreviousPolygonItems.append(polygonItem); |
|
|
|
mPreviousPolygonItems.append(polygonItem); |
|
|
|
|
|
|
|
|
|
|
|
if (!bLineStyle) |
|
|
|
if (!bLineStyle) |
|
|
|