From 63fd000443dc92bdb540f9c4d31598704ebfaf95 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sat, 3 Feb 2018 13:18:00 +0200 Subject: [PATCH] Separate node point settings and piece settings in context menu. --HG-- branch : develop --- src/libs/vtools/tools/nodeDetails/vnodepoint.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/libs/vtools/tools/nodeDetails/vnodepoint.cpp b/src/libs/vtools/tools/nodeDetails/vnodepoint.cpp index b298101b5..983109267 100644 --- a/src/libs/vtools/tools/nodeDetails/vnodepoint.cpp +++ b/src/libs/vtools/tools/nodeDetails/vnodepoint.cpp @@ -276,6 +276,16 @@ void VNodePoint::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) if (VToolSeamAllowance *piece = qgraphicsitem_cast(parentItem())) { QMenu menu; + QAction *actionShowLabel = menu.addAction(tr("Show label")); + actionShowLabel->setCheckable(true); + actionShowLabel->setChecked(VAbstractTool::data.GeometricObject(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 *inLayoutOption = menu.addAction(tr("In layout")); @@ -283,12 +293,6 @@ void VNodePoint::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) const VPiece detail = VAbstractTool::data.GetPiece(piece->getId()); inLayoutOption->setChecked(detail.IsInLayout()); - QAction *actionShowLabel = menu.addAction(tr("Show label")); - actionShowLabel->setCheckable(true); - actionShowLabel->setChecked(VAbstractTool::data.GeometricObject(m_id)->IsShowLabel()); - - QAction *actionExclude = menu.addAction(tr("Exclude")); - QAction *actionRemove = menu.addAction(QIcon::fromTheme("edit-delete"), tr("Delete")); piece->referens() > 1 ? actionRemove->setEnabled(false) : actionRemove->setEnabled(true);