Mercurial > octave
changeset 21651:b4354327d2b5
dbstop: Fix confusion when breakpoints are changed by the GUI (bug #47675)
* file-editor-tab.cc (file_editor_tab::handle_context_menu_break_condition,
filed_editor_tab::check_restor_breakpoints):
Clear conditions as well as lines, so conditions don't jump between bps.
* file-editor-tab.cc (file_editor_tab::do_breakpoint_marker):
Don't re-connect when reappropriating markers.
author | Lachlan Andrew <lachlanbis@gmail.com> |
---|---|
date | Tue, 12 Apr 2016 21:29:01 +1000 |
parents | 7c0595c722ca |
children | 2e07dcdc6139 |
files | libgui/src/m-editor/file-editor-tab.cc |
diffstat | 1 files changed, 30 insertions(+), 26 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor-tab.cc Thu Apr 14 15:27:45 2016 +1000 +++ b/libgui/src/m-editor/file-editor-tab.cc Tue Apr 12 21:29:01 2016 +1000 @@ -346,6 +346,7 @@ break; } _bp_lines.clear (); + _bp_conditions.clear (); } // If text selected by the mouse, default to that instead @@ -1518,8 +1519,9 @@ handle_request_add_breakpoint (_bp_lines.value (i) + 1, _bp_conditions.value (i)); - // reset the list of breakpoints + // Keep the list of breakpoints empty, except after explicit requests. _bp_lines.clear (); + _bp_conditions.clear (); } } @@ -2408,31 +2410,33 @@ } if (bp == 0) - bp = new marker (_edit_area, line, - cond == "" ? marker::breakpoint - : marker::cond_break, cond); - - connect (this, SIGNAL (remove_breakpoint_via_debugger_linenr - (int)), - bp, SLOT (handle_remove_via_original_linenr (int))); - connect (this, SIGNAL (request_remove_breakpoint_via_editor_linenr - (int)), - bp, SLOT (handle_request_remove_via_editor_linenr - (int))); - connect (this, SIGNAL (remove_all_breakpoints (void)), - bp, SLOT (handle_remove (void))); - connect (this, SIGNAL (find_translated_line_number (int, int&, - marker*&)), - bp, SLOT (handle_find_translation (int, int&, - marker*&))); - connect (this, SIGNAL (find_linenr_just_before (int, int&, int&)), - bp, SLOT (handle_find_just_before (int, int&, int&))); - connect (this, SIGNAL (report_marker_linenr (QIntList&, - QStringList&)), - bp, SLOT (handle_report_editor_linenr (QIntList&, - QStringList&))); - connect (bp, SIGNAL (request_remove (int)), - this, SLOT (handle_request_remove_breakpoint (int))); + { + bp = new marker (_edit_area, line, + cond == "" ? marker::breakpoint + : marker::cond_break, cond); + + connect (this, SIGNAL (remove_breakpoint_via_debugger_linenr + (int)), + bp, SLOT (handle_remove_via_original_linenr (int))); + connect (this, SIGNAL (request_remove_breakpoint_via_editor_linenr + (int)), + bp, SLOT (handle_request_remove_via_editor_linenr + (int))); + connect (this, SIGNAL (remove_all_breakpoints (void)), + bp, SLOT (handle_remove (void))); + connect (this, SIGNAL (find_translated_line_number (int, int&, + marker*&)), + bp, SLOT (handle_find_translation (int, int&, + marker*&))); + connect (this, SIGNAL (find_linenr_just_before (int, int&, int&)), + bp, SLOT (handle_find_just_before (int, int&, int&))); + connect (this, SIGNAL (report_marker_linenr (QIntList&, + QStringList&)), + bp, SLOT (handle_report_editor_linenr (QIntList&, + QStringList&))); + connect (bp, SIGNAL (request_remove (int)), + this, SLOT (handle_request_remove_breakpoint (int))); + } } else emit remove_breakpoint_via_debugger_linenr (line);