Mercurial > octave
diff libgui/src/m-editor/file-editor.h @ 29439:fe06fafb4cac
fix en-/disabling some editor actions depending on file type (bug #60214)
* file-editor-tab.cc (handle_request_add_breakpoint): just return if
the file is not an octave file
* file-editor.cc (check_actions): en-/disable the run action and debug
actions depending on tabs and file type, emit signal of changed tabs
also with flag if octave file or not;
(handle_editor_state_changed): store if current file is an octave file,
emit signal with possibly changed file type;
* file-editor.h: signal editor_tabs_changed_signal with two args,
new flag m_is_octave_file
* main-window.cc (handle_exit_debugger): en/-disable step action depending on
editor tabs and file type;
(construct): slot editor_tabs_changed has two args now;
(editor_tabs_changed): two args, store editor file type in flag and
en-/disable step action accordingly
* main-window.h: slot editor_tabs_changed with two args,
new flag m_editor_is_octave_file
author | Torsten Lilge <ttl-octave@mailbox.org> |
---|---|
date | Sun, 14 Mar 2021 22:45:42 +0100 |
parents | 34097a2f1f60 |
children | b4906d3eeb63 |
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor.h Sat Mar 13 10:56:43 2021 +0100 +++ b/libgui/src/m-editor/file-editor.h Sun Mar 14 22:45:42 2021 +0100 @@ -171,7 +171,7 @@ void request_open_file_external (const QString& file_name, int line); void file_loaded_signal (void); - void editor_tabs_changed_signal (bool); + void editor_tabs_changed_signal (bool, bool); void request_dbcont_signal (void); void enter_debug_mode_signal (void); @@ -449,6 +449,7 @@ bool m_copy_action_enabled; bool m_undo_action_enabled; + bool m_is_octave_file; QMenu *m_edit_menu; QMenu *m_edit_cmd_menu;