|
|
@ -840,6 +840,8 @@ void UBGraphicsScene::drawMarkerCircle(const QPointF &pPoint) |
|
|
|
|
|
|
|
|
|
|
|
void UBGraphicsScene::drawPenCircle(const QPointF &pPoint) |
|
|
|
void UBGraphicsScene::drawPenCircle(const QPointF &pPoint) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
QCursor cursor; |
|
|
|
|
|
|
|
|
|
|
|
if (mPenCircle && UBSettings::settings()->showPenPreviewCircle->get().toBool() && |
|
|
|
if (mPenCircle && UBSettings::settings()->showPenPreviewCircle->get().toBool() && |
|
|
|
UBSettings::settings()->currentPenWidth() >= UBSettings::settings()->penPreviewFromSize->get().toInt()) { |
|
|
|
UBSettings::settings()->currentPenWidth() >= UBSettings::settings()->penPreviewFromSize->get().toInt()) { |
|
|
|
qreal penDiameter = UBSettings::settings()->currentPenWidth(); |
|
|
|
qreal penDiameter = UBSettings::settings()->currentPenWidth(); |
|
|
@ -849,20 +851,20 @@ void UBGraphicsScene::drawPenCircle(const QPointF &pPoint) |
|
|
|
|
|
|
|
|
|
|
|
mPenCircle->setRect(QRectF(pPoint.x() - penRadius, pPoint.y() - penRadius, |
|
|
|
mPenCircle->setRect(QRectF(pPoint.x() - penRadius, pPoint.y() - penRadius, |
|
|
|
penDiameter, penDiameter)); |
|
|
|
penDiameter, penDiameter)); |
|
|
|
|
|
|
|
|
|
|
|
if (controlView()) |
|
|
|
|
|
|
|
if (controlView()->viewport()) |
|
|
|
|
|
|
|
controlView()->viewport()->setCursor(QCursor (Qt::BlankCursor)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mPenCircle->show(); |
|
|
|
mPenCircle->show(); |
|
|
|
|
|
|
|
cursor = Qt::BlankCursor; |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
else |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (controlView()) |
|
|
|
cursor = UBResources::resources()->penCursor; |
|
|
|
if (controlView()->viewport()) |
|
|
|
|
|
|
|
controlView()->viewport()->setCursor(UBResources::resources()->penCursor); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!UBDrawingController::drawingController()->mActiveRuler) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
// set cursor only if no active ruler
|
|
|
|
|
|
|
|
if (controlView() && controlView()->viewport()) |
|
|
|
|
|
|
|
controlView()->viewport()->setCursor(cursor); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void UBGraphicsScene::hideMarkerCircle() |
|
|
|
void UBGraphicsScene::hideMarkerCircle() |
|
|
|