Commit c8c712ea authored by Ralf Habacker's avatar Ralf Habacker

Add diagram context menu entry 'Snap Component Size to Grid'

BUG:390717
FIXED-IN:2.24.80 (KDE Applications 18.03.80)
parent 0dee0013
......@@ -2160,6 +2160,8 @@ void ListPopupMenu::setupDiagramMenu(UMLView* view)
insertLayoutItems(view);
insert(mt_SnapToGrid, i18n("Snap to Grid"), CHECKABLE);
setActionChecked(mt_SnapToGrid, view->umlScene()->snapToGrid());
insert(mt_SnapComponentSizeToGrid, i18n("Snap Component Size to Grid"), CHECKABLE);
setActionChecked(mt_SnapComponentSizeToGrid, view->umlScene()->snapComponentSizeToGrid());
insert(mt_ShowSnapGrid, i18n("Show Grid"), CHECKABLE);
setActionChecked(mt_ShowSnapGrid, view->umlScene()->isSnapGridVisible());
insert(mt_ShowDocumentationIndicator, i18n("Show Documentation Indicator"), CHECKABLE);
......
......@@ -234,6 +234,7 @@ public:
mt_Change_Font,
mt_Change_Font_Selection,
mt_SnapToGrid,
mt_SnapComponentSizeToGrid,
mt_ShowDocumentationIndicator,
mt_ShowSnapGrid,
mt_AutoResize,
......
......@@ -3103,6 +3103,11 @@ void UMLScene::slotMenuSelection(QAction* action)
m_doc->setModified();
break;
case ListPopupMenu::mt_SnapComponentSizeToGrid:
toggleSnapComponentSizeToGrid();
m_doc->setModified();
break;
case ListPopupMenu::mt_ShowSnapGrid:
toggleShowGrid();
m_doc->setModified();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment