Mercurial > octave
diff libgui/src/m-editor/file-editor.cc @ 26873:9ec36417c262
debug step starts script if not already running in debug mode (bug #44728)
* file-editor-tab.cc (run_file): new additional parameter whether just
run or step through the file
* file-editor-tab.h: run_file with new parameter
* file-editor.cc (check_actions): emit new signal for indicating the
existence of tabs;
(request_step_into_file): new slote for running a file for stepping
through it;
(add_file_editor_tab): update connection of signal fetab_run_file with
slot run_file with new parameter;
* file-editor.h: updated fetab_run_file signal with new parameter,
new signal editor_tabs_changed for changed number of tabs,
new slot request_step_into_file
* main-window.cc (debug_step_over): check for debug state; if in debug mode
just call dbstep or start stepping through the file otherwise;
(construct): connect new signal for stepping through the current editor
file with the related slot of the editor, connect new editor signal
indicating the exsitence of tabs with the related slot in the main window;
(editor_tabs_changed): new slot for editor signal on changed tabs;
(handle_exit_debugger): only set debug step action to disabled if editor
does not have tabs
* main-window.h: new signal for stepping through the current editor file,
new slot for changed existence of edtior tabs,
new class variable holding whether editor has tabs or not
author | Torsten Lilge <ttl-octave@mailbox.org> |
---|---|
date | Sun, 10 Mar 2019 16:40:35 +0100 |
parents | a595c22464e4 |
children | ce972086bfd6 |
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor.cc Sun Mar 10 14:07:25 2019 +0100 +++ b/libgui/src/m-editor/file-editor.cc Sun Mar 10 16:40:35 2019 +0100 @@ -194,6 +194,8 @@ m_close_action->setEnabled (have_tabs); m_close_all_action->setEnabled (have_tabs); m_close_others_action->setEnabled (have_tabs && m_tab_widget->count () > 1); + + emit editor_tabs_changed_signal (have_tabs); } // empty_script determines whether we have to create an empty script @@ -542,6 +544,11 @@ emit fetab_run_file (m_tab_widget->currentWidget ()); } + void file_editor::request_step_into_file () + { + emit fetab_run_file (m_tab_widget->currentWidget (), true); + } + void file_editor::request_context_run (bool) { emit fetab_context_run (m_tab_widget->currentWidget ()); @@ -2240,8 +2247,8 @@ connect (this, SIGNAL (fetab_print_file (const QWidget*)), f, SLOT (print_file (const QWidget*))); - connect (this, SIGNAL (fetab_run_file (const QWidget*)), - f, SLOT (run_file (const QWidget*))); + connect (this, SIGNAL (fetab_run_file (const QWidget*, bool)), + f, SLOT (run_file (const QWidget*, bool))); connect (this, SIGNAL (fetab_context_run (const QWidget*)), f, SLOT (context_run (const QWidget*)));