comparison libgui/src/main-window.h @ 19980:f7a805f02723

link undo in main window to editor if the latter has focus (bug #44402) * file-editor.cc (editor_tab_has_focus): helper function checking whether an edit area has the focus; (copyClipboard, pasteClipboard, selectAll): use this helper function; (do_undo): new slot for the undo action triggered from the main window * file-editor.h: new helper function and new slots * main-window.cc (handle_undo_request): emit a signal for undo instead of undoing in terminal window when terminal does not have focus * main-window.h: new undo signal * octave-dock-widget.cc (octave_dock_widget): connect undo signal from main-window to new virtual slot; * octave-dock-widget.h: new virtual slot do_undo, doing nothing
author Torsten <ttl@justmail.de>
date Sat, 14 Mar 2015 18:54:23 +0100
parents 72fe9df87fe8
children 857a8f018f53
comparison
equal deleted inserted replaced
19979:941e782d0429 19980:f7a805f02723
101 int line); 101 int line);
102 102
103 void copyClipboard_signal (void); 103 void copyClipboard_signal (void);
104 void pasteClipboard_signal (void); 104 void pasteClipboard_signal (void);
105 void selectAll_signal (void); 105 void selectAll_signal (void);
106 void undo_signal (void);
106 107
107 public slots: 108 public slots:
108 109
109 void focus_changed (QWidget *w_old, QWidget *w_new); 110 void focus_changed (QWidget *w_old, QWidget *w_new);
110 void request_reload_settings (); 111 void request_reload_settings ();