# HG changeset patch # User Torsten # Date 1364478979 -3600 # Node ID 75a6716b72a2247233fbd587f89030b3be890cbf # Parent f3c93e3878658695258d75f4ea00040a0fc7b22e 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 diff --git a/libgui/src/m-editor/file-editor-tab.cc b/libgui/src/m-editor/file-editor-tab.cc --- 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