diff --git a/src/libs/vtools/tools/drawTools/operation/vtoolrotation.cpp b/src/libs/vtools/tools/drawTools/operation/vtoolrotation.cpp index 963c34d36..043c41b04 100644 --- a/src/libs/vtools/tools/drawTools/operation/vtoolrotation.cpp +++ b/src/libs/vtools/tools/drawTools/operation/vtoolrotation.cpp @@ -52,7 +52,7 @@ VToolRotation::VToolRotation(VAbstractPattern *doc, VContainer *data, quint32 id const QVector &destination, const Source &typeCreation, QGraphicsItem *parent) : VDrawTool(doc, data, id), - QGraphicsItem(parent), + QGraphicsLineItem(parent), origPointId(origPointId), formulaAngle(angle), suffix(suffix), @@ -652,20 +652,6 @@ void VToolRotation::SetVisualization() } } -//--------------------------------------------------------------------------------------------------------------------- -QRectF VToolRotation::boundingRect() const -{ - QRectF recTool; - const QList items = childItems(); - foreach (QGraphicsItem *item, items) - { - recTool = recTool.united(item->boundingRect()); - recTool = recTool.united(item->childrenBoundingRect()); - } - - return recTool; -} - //--------------------------------------------------------------------------------------------------------------------- void VToolRotation::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { diff --git a/src/libs/vtools/tools/drawTools/operation/vtoolrotation.h b/src/libs/vtools/tools/drawTools/operation/vtoolrotation.h index ca6fb4d7f..3d811b691 100644 --- a/src/libs/vtools/tools/drawTools/operation/vtoolrotation.h +++ b/src/libs/vtools/tools/drawTools/operation/vtoolrotation.h @@ -42,7 +42,10 @@ class VAbstractSimple; class VSimpleCurve; class VFormula; -class VToolRotation : public VDrawTool, public QGraphicsItem +// FIXME. I don't know how to use QGraphicsItem properly, so just took first available finished class. +// QGraphicsItem itself produce case where clicking on empty space produce call to QGraphicsItem. +// And i don't know how to fix it. +class VToolRotation : public VDrawTool, public QGraphicsLineItem { Q_OBJECT // Fix warning "Class implements the interface QGraphicsItem but does not list it @@ -77,8 +80,6 @@ public: virtual void GroupVisibility(quint32 object, bool visible) Q_DECL_OVERRIDE; virtual void ShowVisualization(bool show) Q_DECL_OVERRIDE; - - virtual QRectF boundingRect() const Q_DECL_OVERRIDE; virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) Q_DECL_OVERRIDE; public slots: