diff options
author | Jochen Becher <jochen_becher@gmx.de> | 2015-09-21 12:11:02 +0200 |
---|---|---|
committer | Jochen Becher <jochen_becher@gmx.de> | 2015-09-30 17:54:08 +0000 |
commit | 64760f0a8d1f72589d995accd003bfd9ec1cc792 (patch) | |
tree | c7c78d14d104a4d3432162f2092d711e93f7e1b9 /src/plugins/modeleditor/actionhandler.cpp | |
parent | 1c7fb225db61864c4122d6e396315f13ce2d8f97 (diff) |
ModelEditor: Remove diagram's specific document and editor
Only one document is created per .qmodel file and only one editor is
opened (splitting is not yet supported). The editor shows one diagram,
another diagram can be shown from the model tree.
Change-Id: Icd8211c14cb09203c52769a8ea1c90edb741ae51
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Diffstat (limited to 'src/plugins/modeleditor/actionhandler.cpp')
-rw-r--r-- | src/plugins/modeleditor/actionhandler.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/plugins/modeleditor/actionhandler.cpp b/src/plugins/modeleditor/actionhandler.cpp index b2667fe474..f248d00aa9 100644 --- a/src/plugins/modeleditor/actionhandler.cpp +++ b/src/plugins/modeleditor/actionhandler.cpp @@ -31,7 +31,7 @@ #include "actionhandler.h" #include "modeleditor_constants.h" -#include "abstracteditor.h" +#include "modeleditor.h" #include <coreplugin/coreconstants.h> #include <coreplugin/actionmanager/actionmanager.h> @@ -147,63 +147,63 @@ void ActionHandler::createEditPropertiesShortcut(const Core::Id &shortcutId) void ActionHandler::undo() { - auto editor = dynamic_cast<AbstractEditor *>(Core::EditorManager::currentEditor()); + auto editor = qobject_cast<ModelEditor *>(Core::EditorManager::currentEditor()); if (editor) editor->undo(); } void ActionHandler::redo() { - auto editor = dynamic_cast<AbstractEditor *>(Core::EditorManager::currentEditor()); + auto editor = qobject_cast<ModelEditor *>(Core::EditorManager::currentEditor()); if (editor) editor->redo(); } void ActionHandler::cut() { - auto editor = dynamic_cast<AbstractEditor *>(Core::EditorManager::currentEditor()); + auto editor = qobject_cast<ModelEditor *>(Core::EditorManager::currentEditor()); if (editor) editor->cut(); } void ActionHandler::copy() { - auto editor = dynamic_cast<AbstractEditor *>(Core::EditorManager::currentEditor()); + auto editor = qobject_cast<ModelEditor *>(Core::EditorManager::currentEditor()); if (editor) editor->copy(); } void ActionHandler::paste() { - auto editor = dynamic_cast<AbstractEditor *>(Core::EditorManager::currentEditor()); + auto editor = qobject_cast<ModelEditor *>(Core::EditorManager::currentEditor()); if (editor) editor->paste(); } void ActionHandler::removeSelectedElements() { - auto editor = dynamic_cast<AbstractEditor *>(Core::EditorManager::currentEditor()); + auto editor = qobject_cast<ModelEditor *>(Core::EditorManager::currentEditor()); if (editor) editor->removeSelectedElements(); } void ActionHandler::deleteSelectedElements() { - auto editor = dynamic_cast<AbstractEditor *>(Core::EditorManager::currentEditor()); + auto editor = qobject_cast<ModelEditor *>(Core::EditorManager::currentEditor()); if (editor) editor->deleteSelectedElements(); } void ActionHandler::selectAll() { - auto editor = dynamic_cast<AbstractEditor *>(Core::EditorManager::currentEditor()); + auto editor = qobject_cast<ModelEditor *>(Core::EditorManager::currentEditor()); if (editor) editor->selectAll(); } void ActionHandler::onEditProperties() { - auto editor = dynamic_cast<AbstractEditor *>(Core::EditorManager::currentEditor()); + auto editor = qobject_cast<ModelEditor *>(Core::EditorManager::currentEditor()); if (editor) editor->editProperties(); } |