changeset 14833:422b0b2ce5f8 gui

Second attempt to fix setting breakpoints. * file-editor-tab.cc: Removed +1 offset in line numbers. * octave-event.h: Added +1 offset when setting a breakpoint.
author Jacob Dawid <jacob.dawid@googlemail.com>
date Mon, 02 Jul 2012 22:47:23 +0200
parents 9c07dde77266
children 9a355dfc7701
files gui/src/m-editor/file-editor-tab.cc gui/src/octave-adapter/octave-event.h
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/gui/src/m-editor/file-editor-tab.cc	Mon Jul 02 18:33:34 2012 +0200
+++ b/gui/src/m-editor/file-editor-tab.cc	Mon Jul 02 22:47:23 2012 +0200
@@ -215,7 +215,7 @@
       (new octave_add_breakpoint_event (*this,
                                         path.toStdString (),
                                         function_name.toStdString (),
-                                        line + 1));
+                                        line));
 }
 
 void
@@ -232,7 +232,7 @@
       (new octave_remove_breakpoint_event (*this,
                                            path.toStdString (),
                                            function_name.toStdString (),
-                                           line + 1));
+                                           line));
 }
 
 void
--- a/gui/src/octave-adapter/octave-event.h	Mon Jul 02 18:33:34 2012 +0200
+++ b/gui/src/octave-adapter/octave-event.h	Mon Jul 02 22:47:23 2012 +0200
@@ -267,7 +267,7 @@
     bool perform ()
     {
       bp_table::intmap intmap;
-      intmap[0] = _line;
+      intmap[0] = _line + 1;
 
       std::string previous_directory = octave_env::get_current_directory ();
       octave_env::chdir (_path);