diff libgui/src/m-editor/file-editor-tab.h @ 29698:bbf5d4ea616c

fix enabled state of editor save action depending on modification state * file-editor-tab.cc (set_file_name): signal editor_state_changed with additional boolean argument with modification state; (handle_copy_available): dito; (change_editor_state): dito * file-editor-tab.h: dito * file-editor.cc (file_editor): initialize new class variable m_current_tab_modified with modified state of current tab; (check_actions): enable save action depending on modification state (handle_file_name_changed): enable save action and set class related class variable; (handle_editor_state_changed): additional boolean argument with modification state, enable save action accordingly and set the related class variable * file-editor.h: handle_editor_state_changed with third argument, new class variable
author Torsten Lilge <ttl-octave@mailbox.org>
date Mon, 24 May 2021 20:05:23 +0200
parents 3d34b70b5a49
children da9c55b3e9fa
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor-tab.h	Fri May 21 17:00:54 2021 +0200
+++ b/libgui/src/m-editor/file-editor-tab.h	Mon May 24 20:05:23 2021 +0200
@@ -74,7 +74,8 @@
     void file_name_changed (const QString& fileName,
                             const QString& toolTip,
                             bool modified);
-    void editor_state_changed (bool copy_available, bool is_octave_file);
+    void editor_state_changed (bool copy_available, bool is_octave_file,
+                               bool is_modified);
     void set_focus_editor_signal (QWidget *);
     void edit_area_changed (octave_qscintilla *edit_area);
     void tab_remove_request (void);