# HG changeset patch # User Torsten # Date 1364468550 -3600 # Node ID f3c93e3878658695258d75f4ea00040a0fc7b22e # Parent 4902484f9181f1d02d444c4fab307d7872d6bf29 gui: recenter the line in the editor where the debugger stopped * file-editor-tab.cc(set_debugger_position): scroll the widget of the editor widget such that the line where the debugger stopped is centered diff -r 4902484f9181 -r f3c93e387865 libgui/src/m-editor/file-editor-tab.cc --- a/libgui/src/m-editor/file-editor-tab.cc Thu Mar 28 03:20:25 2013 -0400 +++ b/libgui/src/m-editor/file-editor-tab.cc Thu Mar 28 12:02:30 2013 +0100 @@ -1156,6 +1156,11 @@ if (line > 0) { _edit_area->markerAdd (line, debugger_position); + int first_line = _edit_area->firstVisibleLine (); + long int visible_lines = _edit_area->SendScintilla + (QsciScintillaBase::SCI_LINESONSCREEN); + first_line = first_line + (line - first_line - visible_lines/2); + _edit_area->setFirstVisibleLine (first_line); } }