fix: ruler stays effective after deleted from board

- set active ruler only with drawing tool
- avoid setting the active ruler when entering the ruler to close it
more-line-styles
letsfindaway 2 years ago
parent e7907cd38f
commit f1ea20c9dc
  1. 4
      src/tools/UBGraphicsRuler.cpp

@ -420,9 +420,6 @@ void UBGraphicsRuler::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
{
UBStylusTool::Enum currentTool = (UBStylusTool::Enum)UBDrawingController::drawingController ()->stylusTool ();
if (UBDrawingController::drawingController()->mActiveRuler == nullptr)
UBDrawingController::drawingController()->mActiveRuler = this;
if (currentTool == UBStylusTool::Selector ||
currentTool == UBStylusTool::Play)
{
@ -453,6 +450,7 @@ void UBGraphicsRuler::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
else if (UBDrawingController::drawingController()->isDrawingTool())
{
setCursor(drawRulerLineCursor());
UBDrawingController::drawingController()->mActiveRuler = this;
event->accept();
}
}

Loading…
Cancel
Save