|
|
@ -451,8 +451,8 @@ bool UBGraphicsScene::inputDevicePress(const QPointF& scenePos, const qreal& pre |
|
|
|
mAddedItems.clear(); |
|
|
|
mAddedItems.clear(); |
|
|
|
mRemovedItems.clear(); |
|
|
|
mRemovedItems.clear(); |
|
|
|
|
|
|
|
|
|
|
|
if (UBDrawingController::drawingController()->mActiveRuler) |
|
|
|
if (UBDrawingController::drawingController()->activeRuler()) |
|
|
|
UBDrawingController::drawingController()->mActiveRuler->StartLine(scenePos, width); |
|
|
|
UBDrawingController::drawingController()->activeRuler()->StartLine(scenePos, width); |
|
|
|
else { |
|
|
|
else { |
|
|
|
moveTo(scenePos); |
|
|
|
moveTo(scenePos); |
|
|
|
drawLineTo(scenePos, width, UBDrawingController::drawingController()->stylusTool() == UBStylusTool::Line); |
|
|
|
drawLineTo(scenePos, width, UBDrawingController::drawingController()->stylusTool() == UBStylusTool::Line); |
|
|
@ -539,7 +539,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 (currentTool == UBStylusTool::Line || dc->mActiveRuler) |
|
|
|
if (currentTool == UBStylusTool::Line || dc->activeRuler()) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (UBDrawingController::drawingController()->stylusTool() != UBStylusTool::Marker) |
|
|
|
if (UBDrawingController::drawingController()->stylusTool() != UBStylusTool::Marker) |
|
|
|
if(NULL != mpLastPolygon && NULL != mCurrentStroke && mAddedItems.size() > 0){ |
|
|
|
if(NULL != mpLastPolygon && NULL != mCurrentStroke && mAddedItems.size() > 0){ |
|
|
@ -573,8 +573,8 @@ bool UBGraphicsScene::inputDeviceMove(const QPointF& scenePos, const qreal& pres |
|
|
|
if (!mCurrentStroke) |
|
|
|
if (!mCurrentStroke) |
|
|
|
mCurrentStroke = new UBGraphicsStroke(this); |
|
|
|
mCurrentStroke = new UBGraphicsStroke(this); |
|
|
|
|
|
|
|
|
|
|
|
if(dc->mActiveRuler){ |
|
|
|
if(dc->activeRuler()){ |
|
|
|
dc->mActiveRuler->DrawLine(position, width); |
|
|
|
dc->activeRuler()->DrawLine(position, width); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
else if (currentTool == UBStylusTool::Line) { |
|
|
|
else if (currentTool == UBStylusTool::Line) { |
|
|
@ -859,7 +859,7 @@ void UBGraphicsScene::drawPenCircle(const QPointF &pPoint) |
|
|
|
cursor = UBResources::resources()->penCursor; |
|
|
|
cursor = UBResources::resources()->penCursor; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!UBDrawingController::drawingController()->mActiveRuler) |
|
|
|
if (!UBDrawingController::drawingController()->activeRuler()) |
|
|
|
{ |
|
|
|
{ |
|
|
|
// set cursor only if no active ruler
|
|
|
|
// set cursor only if no active ruler
|
|
|
|
if (controlView() && controlView()->viewport()) |
|
|
|
if (controlView() && controlView()->viewport()) |
|
|
|