From 0264852feb2bd5d71e7631c3feac6609f40b0627 Mon Sep 17 00:00:00 2001 From: Anatoly Mihalchenko Date: Mon, 22 Aug 2011 18:54:19 +0300 Subject: [PATCH] GraphicsTriangle - drawing --- src/tools/UBGraphicsTriangle.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/tools/UBGraphicsTriangle.cpp b/src/tools/UBGraphicsTriangle.cpp index 90fde242..ea60c4e0 100644 --- a/src/tools/UBGraphicsTriangle.cpp +++ b/src/tools/UBGraphicsTriangle.cpp @@ -802,6 +802,7 @@ void UBGraphicsTriangle::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) mVFlipSvgItem->setVisible(false); mHFlipSvgItem->setVisible(false); mRotateSvgItem->setVisible(false); + UBDrawingController::drawingController()->mActiveRuler = NULL; event->accept(); update(); } @@ -824,21 +825,20 @@ void UBGraphicsTriangle::hoverMoveEvent(QGraphicsSceneHoverEvent *event) else if (closeButtonRect().contains(event->pos())) setCursor(closeCursor()); else if (hFlipRect().contains(event->pos()) - || vFlipRect().contains(event->pos())) - setCursor(flipCursor()); + || vFlipRect().contains(event->pos())) + setCursor(flipCursor()); else if (rotateRect().contains(event->pos())) setCursor(rotateCursor()); else setCursor(moveCursor()); + event->accept(); + } else if (UBDrawingController::drawingController()->isDrawingTool()) { event->accept(); } } void UBGraphicsTriangle::StartLine(const QPointF &scenePos, qreal width) { - qDebug() << "morientation" << mOrientation; - //qDebug() << "triangle rect()" << rect(); - QPointF itemPos = mapFromScene(scenePos); qreal y;