Mercurial > octave-nkf
comparison libgui/src/octave-dock-widget.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 | 66928b4546ab |
children | 643de08e524c |
comparison
equal
deleted
inserted
replaced
19979:941e782d0429 | 19980:f7a805f02723 |
---|---|
95 { | 95 { |
96 if (visible) | 96 if (visible) |
97 emit active_changed (true); | 97 emit active_changed (true); |
98 } | 98 } |
99 /** slots to handle copy & paste */ | 99 /** slots to handle copy & paste */ |
100 virtual void copyClipboard () | 100 virtual void copyClipboard () { } |
101 { | 101 virtual void pasteClipboard () { } |
102 } | 102 virtual void selectAll () { } |
103 virtual void pasteClipboard () | 103 /** slots to handle undo */ |
104 { | 104 virtual void do_undo () { } |
105 } | |
106 virtual void selectAll () | |
107 { | |
108 } | |
109 | 105 |
110 // event filter for double clicks into the window decoration elements | 106 // event filter for double clicks into the window decoration elements |
111 bool eventFilter(QObject *obj, QEvent *e); | 107 bool eventFilter(QObject *obj, QEvent *e); |
112 | 108 |
113 private slots: | 109 private slots: |