Check keyboard modificator and add object reversed if pressed Shift.
--HG-- branch : feature
This commit is contained in:
parent
a378922bf6
commit
e261d02f89
|
@ -81,13 +81,17 @@ void DialogSeamAllowance::SetPiece(const VPiece &piece)
|
||||||
void DialogSeamAllowance::ChosenObject(quint32 id, const SceneObject &type)
|
void DialogSeamAllowance::ChosenObject(quint32 id, const SceneObject &type)
|
||||||
{
|
{
|
||||||
bool reverse = false;
|
bool reverse = false;
|
||||||
|
if (QGuiApplication::keyboardModifiers() == Qt::ShiftModifier)
|
||||||
|
{
|
||||||
|
reverse = true;
|
||||||
|
}
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case SceneObject::Arc:
|
case SceneObject::Arc:
|
||||||
NewItem(VPieceNode(id, Tool::NodeArc, reverse));
|
NewItem(VPieceNode(id, Tool::NodeArc, reverse));
|
||||||
break;
|
break;
|
||||||
case SceneObject::Point:
|
case SceneObject::Point:
|
||||||
NewItem(VPieceNode(id, Tool::NodePoint, reverse));
|
NewItem(VPieceNode(id, Tool::NodePoint));
|
||||||
break;
|
break;
|
||||||
case SceneObject::Spline:
|
case SceneObject::Spline:
|
||||||
NewItem(VPieceNode(id, Tool::NodeSpline, reverse));
|
NewItem(VPieceNode(id, Tool::NodeSpline, reverse));
|
||||||
|
@ -160,7 +164,7 @@ void DialogSeamAllowance::NewItem(const VPieceNode &node)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (node.GetReverse())
|
if (node.GetTypeTool() != Tool::NodePoint && node.GetReverse())
|
||||||
{
|
{
|
||||||
name = QLatin1String("- ") + name;
|
name = QLatin1String("- ") + name;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user