Mercurial > hg > octave-nkf
diff libgui/src/m-editor/file-editor.cc @ 16389:f5204f486a29
gui: add shortcut for goto line action in the editor and center the target line
* file-editor.cc(construct): add shortcut Ctrl-G for goto line action
* file-editor-tab.cc(center_current_line): new function, centering current line
* file-editor-tab.cc(set_debugger_position): use center_current_line
* file-editor-tab.cc(goto_line): call center_current_line only if goto_line was
called from goto line action
* file-editor-tab.h: new function center_current_line
author | Torsten <ttl@justmail.de> |
---|---|
date | Thu, 28 Mar 2013 17:01:43 +0100 |
parents | 4902484f9181 |
children | fc491da603f6 |
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor.cc +++ b/libgui/src/m-editor/file-editor.cc @@ -658,6 +658,8 @@ uncomment_selection_action->setShortcutContext(Qt::WindowShortcut); find_action->setShortcut (QKeySequence::Find); find_action->setShortcutContext (Qt::WindowShortcut); + goto_line_action->setShortcut (Qt::ControlModifier+ Qt::Key_G); + goto_line_action->setShortcutContext (Qt::WindowShortcut); // toolbar _tool_bar->addAction (new_action);