Separate node point settings and piece settings in context menu.
--HG-- branch : develop
This commit is contained in:
parent
28044ff4c6
commit
63fd000443
|
@ -276,6 +276,16 @@ void VNodePoint::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
|
||||||
if (VToolSeamAllowance *piece = qgraphicsitem_cast<VToolSeamAllowance *>(parentItem()))
|
if (VToolSeamAllowance *piece = qgraphicsitem_cast<VToolSeamAllowance *>(parentItem()))
|
||||||
{
|
{
|
||||||
QMenu menu;
|
QMenu menu;
|
||||||
|
QAction *actionShowLabel = menu.addAction(tr("Show label"));
|
||||||
|
actionShowLabel->setCheckable(true);
|
||||||
|
actionShowLabel->setChecked(VAbstractTool::data.GeometricObject<VPointF>(m_id)->IsShowLabel());
|
||||||
|
|
||||||
|
QAction *actionExclude = menu.addAction(tr("Exclude"));
|
||||||
|
|
||||||
|
QAction *separatorAct = new QAction(this);
|
||||||
|
separatorAct->setSeparator(true);
|
||||||
|
menu.addAction(separatorAct);
|
||||||
|
|
||||||
QAction *actionOption = menu.addAction(QIcon::fromTheme("preferences-other"), tr("Options"));
|
QAction *actionOption = menu.addAction(QIcon::fromTheme("preferences-other"), tr("Options"));
|
||||||
|
|
||||||
QAction *inLayoutOption = menu.addAction(tr("In layout"));
|
QAction *inLayoutOption = menu.addAction(tr("In layout"));
|
||||||
|
@ -283,12 +293,6 @@ void VNodePoint::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
|
||||||
const VPiece detail = VAbstractTool::data.GetPiece(piece->getId());
|
const VPiece detail = VAbstractTool::data.GetPiece(piece->getId());
|
||||||
inLayoutOption->setChecked(detail.IsInLayout());
|
inLayoutOption->setChecked(detail.IsInLayout());
|
||||||
|
|
||||||
QAction *actionShowLabel = menu.addAction(tr("Show label"));
|
|
||||||
actionShowLabel->setCheckable(true);
|
|
||||||
actionShowLabel->setChecked(VAbstractTool::data.GeometricObject<VPointF>(m_id)->IsShowLabel());
|
|
||||||
|
|
||||||
QAction *actionExclude = menu.addAction(tr("Exclude"));
|
|
||||||
|
|
||||||
QAction *actionRemove = menu.addAction(QIcon::fromTheme("edit-delete"), tr("Delete"));
|
QAction *actionRemove = menu.addAction(QIcon::fromTheme("edit-delete"), tr("Delete"));
|
||||||
piece->referens() > 1 ? actionRemove->setEnabled(false) : actionRemove->setEnabled(true);
|
piece->referens() > 1 ? actionRemove->setEnabled(false) : actionRemove->setEnabled(true);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user