From 9b6ff808c551b38e2c1d3e3ec7d9ca0650fb582a Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Tue, 19 Aug 2014 01:57:20 +0200 Subject: [PATCH] Save from the file menu too. --HG-- branch : dfighter-tools --- .../src/plugins/georges_editor/georges_editor_form.cpp | 6 +++++- .../src/plugins/georges_editor/georges_editor_plugin.cpp | 5 +++++ .../src/plugins/georges_editor/georges_editor_plugin.h | 2 ++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/code/studio/src/plugins/georges_editor/georges_editor_form.cpp b/code/studio/src/plugins/georges_editor/georges_editor_form.cpp index dc0ca409d..b05077c0a 100644 --- a/code/studio/src/plugins/georges_editor/georges_editor_form.cpp +++ b/code/studio/src/plugins/georges_editor/georges_editor_form.cpp @@ -144,8 +144,12 @@ namespace GeorgesQt void GeorgesEditorForm::save() { m_lastActiveDock->write(); - m_saveAction->setEnabled(false); + + m_saveAction->setEnabled(false); + QAction *saveAction = Core::ICore::instance()->menuManager()->action( Core::Constants::SAVE ); + if( saveAction != NULL ) + saveAction->setEnabled(false); } void GeorgesEditorForm::readSettings() diff --git a/code/studio/src/plugins/georges_editor/georges_editor_plugin.cpp b/code/studio/src/plugins/georges_editor/georges_editor_plugin.cpp index f1b419e4e..e0b29af2f 100644 --- a/code/studio/src/plugins/georges_editor/georges_editor_plugin.cpp +++ b/code/studio/src/plugins/georges_editor/georges_editor_plugin.cpp @@ -94,6 +94,11 @@ void GeorgesEditorContext::open() m_georgesEditorForm->open(); } +void GeorgesEditorContext::save() +{ + m_georgesEditorForm->save(); +} + QWidget *GeorgesEditorContext::widget() { return m_georgesEditorForm; diff --git a/code/studio/src/plugins/georges_editor/georges_editor_plugin.h b/code/studio/src/plugins/georges_editor/georges_editor_plugin.h index e21d8c57a..931e83ddf 100644 --- a/code/studio/src/plugins/georges_editor/georges_editor_plugin.h +++ b/code/studio/src/plugins/georges_editor/georges_editor_plugin.h @@ -86,6 +86,8 @@ public: virtual void open(); + void save(); + virtual QUndoStack *undoStack(); virtual QWidget *widget();