Fix label rotation.
--HG-- branch : feature
This commit is contained in:
parent
e3fdad1321
commit
0a94c5036b
|
@ -541,6 +541,12 @@ void VGrainlineItem::UpdateRectangle()
|
|||
prepareGeometryChange();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
double VGrainlineItem::GetAngle(const QPointF &pt) const
|
||||
{
|
||||
return -VPieceItem::GetAngle(pt);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief VGrainlineItem::Rotate rotates point pt around ptCenter by angle dAng [rad]
|
||||
|
|
|
@ -59,6 +59,8 @@ protected:
|
|||
virtual void Update() Q_DECL_OVERRIDE;
|
||||
void UpdateRectangle();
|
||||
|
||||
virtual double GetAngle(const QPointF &pt) const Q_DECL_OVERRIDE;
|
||||
|
||||
QPointF Rotate(const QPointF& pt, const QPointF& ptCenter, qreal dAng) const;
|
||||
QPointF GetInsideCorner(int i, qreal dDist) const;
|
||||
|
||||
|
|
|
@ -103,7 +103,7 @@ double VPieceItem::GetAngle(const QPointF &pt) const
|
|||
}
|
||||
else
|
||||
{
|
||||
return -qAtan2(dY, dX);
|
||||
return qAtan2(dY, dX);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -48,8 +48,6 @@ public:
|
|||
void Reset();
|
||||
bool IsIdle() const;
|
||||
|
||||
double GetAngle(const QPointF &pt) const;
|
||||
|
||||
MoveType GetMoveType() const;
|
||||
void SetMoveType(const MoveType &moveType);
|
||||
|
||||
|
@ -72,6 +70,8 @@ protected:
|
|||
|
||||
qreal m_inactiveZ;
|
||||
|
||||
virtual double GetAngle(const QPointF &pt) const;
|
||||
|
||||
private:
|
||||
Q_DISABLE_COPY(VPieceItem)
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user