diff gui/src/m-editor/file-editor-tab.cc @ 14829:e97be88fc478 gui

Fixed removing all breakpoints. * file-editor-tab: Renamed slot to remove all breakpoints. * file-editor: Renamed slot to remove all breakpoints. * octave-event: Added checking for return value when adding breakpoints.
author Jacob Dawid <jacob.dawid@googlemail.com>
date Mon, 02 Jul 2012 15:18:55 +0200
parents 6b90737f69cc
children 41b86dc61306
line wrap: on
line diff
--- a/gui/src/m-editor/file-editor-tab.cc
+++ b/gui/src/m-editor/file-editor-tab.cc
@@ -383,9 +383,19 @@
 }
 
 void
-file_editor_tab::remove_breakpoint ()
+file_editor_tab::remove_all_breakpoints ()
 {
-    _edit_area->markerDeleteAll (breakpoint);
+  QFileInfo file_info (_file_name);
+  QString path = file_info.absolutePath ();
+  QString function_name = file_info.fileName ();
+
+  // We have to cut off the suffix, because octave appends it.
+  function_name.chop (file_info.suffix ().length () + 1);
+
+  octave_link::instance ()->post_event
+      (new octave_remove_all_breakpoints_event (*this,
+                                                path.toStdString (),
+                                                function_name.toStdString ()));
 }
 
 void