Mercurial > hg > octave-nkf
changeset 16388:75a6716b72a2
gui: prevent a second breakpoint marker when adding a breakpoint in the editor
* file-editor-tab.cc(add_breakpoint_callback): do not set the breakpoint marker
manually, only via bp_table::add_breakpoint
* file-editor-tab.cc(remove_breakpoint_callback): do not remove the marker a
second time, correct the line number
author | Torsten <ttl@justmail.de> |
---|---|
date | Thu, 28 Mar 2013 14:56:19 +0100 |
parents | f3c93e387865 |
children | f5204f486a29 |
files | libgui/src/m-editor/file-editor-tab.cc |
diffstat | 1 files changed, 2 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor-tab.cc +++ b/libgui/src/m-editor/file-editor-tab.cc @@ -432,33 +432,19 @@ octave_env::chdir (info.path); intmap = bp_table::add_breakpoint (info.function_name, intmap); octave_env::chdir (previous_directory); - - if (intmap.size () > 0) - { - // FIXME -- Check file. - _edit_area->markerAdd (info.line, breakpoint); - } + // bp_table::add_breakpoint also sets the marker in the editor } void file_editor_tab::remove_breakpoint_callback (const bp_info& info) { bp_table::intmap intmap; - intmap[0] = info.line; + intmap[0] = info.line + 1; std::string previous_directory = octave_env::get_current_directory (); octave_env::chdir (info.path); bp_table::remove_breakpoint (info.function_name, intmap); octave_env::chdir (previous_directory); - - // FIXME -- check result - bool success = true; - - if (success) - { - // FIXME -- check file. - _edit_area->markerDelete (info.line, breakpoint); - } } void