Commit 1e4efa2c authored by Ralf Habacker's avatar Ralf Habacker
Browse files

Separate context menu items related to linked diagrams from others with separators

CCBUG:53369
CCBUG:413579
parent 5bb6510e
...@@ -38,10 +38,13 @@ UMLScenePopupMenu::UMLScenePopupMenu(QWidget *parent, UMLScene *scene) ...@@ -38,10 +38,13 @@ UMLScenePopupMenu::UMLScenePopupMenu(QWidget *parent, UMLScene *scene)
case Uml::DiagramType::Sequence: case Uml::DiagramType::Sequence:
case Uml::DiagramType::Collaboration: case Uml::DiagramType::Collaboration:
if (type == Uml::DiagramType::State && scene->widgetLink()) { if (type == Uml::DiagramType::State && scene->widgetLink()) {
if (scene->widgetLink()->isStateWidget()) if (scene->widgetLink()->isStateWidget()) {
insert(mt_ReturnToCombinedState); insert(mt_ReturnToCombinedState);
else if (scene->widgetLink()->isClassWidget()) addSeparator();
} else if (scene->widgetLink()->isClassWidget()) {
insert(mt_ReturnToClass); insert(mt_ReturnToClass);
addSeparator();
}
} }
insertSubMenuNew(type); insertSubMenuNew(type);
addSeparator(); addSeparator();
......
...@@ -349,6 +349,7 @@ void WidgetBasePopupMenu::insertSingleSelectionMenu(WidgetBase* widget) ...@@ -349,6 +349,7 @@ void WidgetBasePopupMenu::insertSingleSelectionMenu(WidgetBase* widget)
switch (pState->stateType()) { switch (pState->stateType()) {
case StateWidget::Combined: case StateWidget::Combined:
insert(mt_EditCombinedState); insert(mt_EditCombinedState);
addSeparator();
break; break;
default: default:
break; break;
...@@ -356,7 +357,7 @@ void WidgetBasePopupMenu::insertSingleSelectionMenu(WidgetBase* widget) ...@@ -356,7 +357,7 @@ void WidgetBasePopupMenu::insertSingleSelectionMenu(WidgetBase* widget)
insertSubMenuNew(type); insertSubMenuNew(type);
insertSubMenuColor(widget->useFillColor()); insertSubMenuColor(widget->useFillColor());
insertStdItems(false, type); insertStdItems(true, type);
switch (pState->stateType()) { switch (pState->stateType()) {
case StateWidget::Combined: case StateWidget::Combined:
insert(mt_Change_Font); insert(mt_Change_Font);
......
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