diff options
author | Eike Ziller <eike.ziller@qt.io> | 2018-02-01 13:58:07 +0100 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2018-02-05 10:43:47 +0000 |
commit | dcfa07ba7615799b0cd0c8accfc1a11954a5edb2 (patch) | |
tree | 25fef5da3d93253adfdbbd509d938d831c576eeb /src/plugins/modeleditor/actionhandler.cpp | |
parent | e1d2d35c20163083266e2e450ef54bfb15d2b47d (diff) |
ModelEditor: Move export actions to File menu
Only visible when a model editor is active
Change-Id: Ia21045188867b23815bd05432d1fd4699de8bd61
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Diffstat (limited to 'src/plugins/modeleditor/actionhandler.cpp')
-rw-r--r-- | src/plugins/modeleditor/actionhandler.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/plugins/modeleditor/actionhandler.cpp b/src/plugins/modeleditor/actionhandler.cpp index 57a9602462..17de4270d5 100644 --- a/src/plugins/modeleditor/actionhandler.cpp +++ b/src/plugins/modeleditor/actionhandler.cpp @@ -135,6 +135,7 @@ QAction *ActionHandler::exportSelectedElementsAction() const void ActionHandler::createActions() { Core::ActionContainer *medit = Core::ActionManager::actionContainer(Core::Constants::M_EDIT); + Core::ActionContainer *mfile = Core::ActionManager::actionContainer(Core::Constants::M_FILE); d->undoAction = registerCommand(Core::Constants::UNDO, &ModelEditor::undo, d->context)->action(); d->redoAction = registerCommand(Core::Constants::REDO, &ModelEditor::redo, d->context)->action(); @@ -161,17 +162,17 @@ void ActionHandler::createActions() Core::Command *exportDiagramCommand = registerCommand( Constants::EXPORT_DIAGRAM, &ModelEditor::exportDiagram, d->context, true, tr("Export Diagram...")); - menuModelEditor->addAction(exportDiagramCommand); + exportDiagramCommand->setAttribute(Core::Command::CA_Hide); + mfile->addAction(exportDiagramCommand, Core::Constants::G_FILE_EXPORT); d->exportDiagramAction = exportDiagramCommand->action(); Core::Command *exportSelectedElementsCommand = registerCommand( Constants::EXPORT_SELECTED_ELEMENTS, &ModelEditor::exportSelectedElements, d->context, true, tr("Export Selected Elements...")); - menuModelEditor->addAction(exportSelectedElementsCommand); + exportSelectedElementsCommand->setAttribute(Core::Command::CA_Hide); + mfile->addAction(exportSelectedElementsCommand, Core::Constants::G_FILE_EXPORT); d->exportSelectedElementsAction = exportSelectedElementsCommand->action(); - menuModelEditor->addSeparator(d->context); - Core::Command *zoomInCommand = registerCommand( Core::Constants::ZOOM_IN, &ModelEditor::zoomIn, d->context); menuModelEditor->addAction(zoomInCommand); |