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