Do not submit angle type if it has not been changed.

--HG--
branch : release
This commit is contained in:
Roman Telezhynskyi 2018-09-02 18:52:19 +03:00
parent ebab1a0345
commit d9bb978532

View File

@ -378,30 +378,48 @@ void VNodePoint::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
emit ToggleExcludeState(m_id); emit ToggleExcludeState(m_id);
} }
else if (selectedAction == actionByLength) else if (selectedAction == actionByLength)
{
if (curType != PieceNodeAngle::ByLength)
{ {
emit ToggleAngleType(m_id, PieceNodeAngle::ByLength); emit ToggleAngleType(m_id, PieceNodeAngle::ByLength);
} }
}
else if (selectedAction == actionByPointsIntersection) else if (selectedAction == actionByPointsIntersection)
{
if (curType != PieceNodeAngle::ByPointsIntersection)
{ {
emit ToggleAngleType(m_id, PieceNodeAngle::ByPointsIntersection); emit ToggleAngleType(m_id, PieceNodeAngle::ByPointsIntersection);
} }
}
else if (selectedAction == actionByFirstEdgeSymmetry) else if (selectedAction == actionByFirstEdgeSymmetry)
{
if (curType != PieceNodeAngle::ByFirstEdgeSymmetry)
{ {
emit ToggleAngleType(m_id, PieceNodeAngle::ByFirstEdgeSymmetry); emit ToggleAngleType(m_id, PieceNodeAngle::ByFirstEdgeSymmetry);
} }
}
else if (selectedAction == actionBySecondEdgeSymmetry) else if (selectedAction == actionBySecondEdgeSymmetry)
{
if (curType != PieceNodeAngle::BySecondEdgeSymmetry)
{ {
emit ToggleAngleType(m_id, PieceNodeAngle::BySecondEdgeSymmetry); emit ToggleAngleType(m_id, PieceNodeAngle::BySecondEdgeSymmetry);
} }
}
else if (selectedAction == actionByFirstEdgeRightAngle) else if (selectedAction == actionByFirstEdgeRightAngle)
{
if (curType != PieceNodeAngle::ByFirstEdgeRightAngle)
{ {
emit ToggleAngleType(m_id, PieceNodeAngle::ByFirstEdgeRightAngle); emit ToggleAngleType(m_id, PieceNodeAngle::ByFirstEdgeRightAngle);
} }
}
else if (selectedAction == actionBySecondEdgeRightAngle) else if (selectedAction == actionBySecondEdgeRightAngle)
{
if (curType != PieceNodeAngle::BySecondEdgeRightAngle)
{ {
emit ToggleAngleType(m_id, PieceNodeAngle::BySecondEdgeRightAngle); emit ToggleAngleType(m_id, PieceNodeAngle::BySecondEdgeRightAngle);
} }
} }
}
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------