Mercurial > octave
diff libgui/src/octave-dock-widget.cc @ 29891:7f22f024afdf
fix broken signal/slot connections for the variable editor
* octave-dock-widget.cc (label_dock_widget::label_dock_widget): do not
connect copy/paste/select/undo signals from to the parent but from the
main window to the related slots
* octave-qobject.h: new function returning the data member for
containing the pointer to the main window
* variable-editor.cc (edit_variable): fix refloat in connection from
signal to slot, fix name of the signal for updating the title to
description_changed.
author | Torsten Lilge <ttl-octave@mailbox.org> |
---|---|
date | Sun, 18 Jul 2021 19:20:45 +0200 |
parents | 5154c91e0d98 |
children | 2a14420440b8 |
line wrap: on
line diff
--- a/libgui/src/octave-dock-widget.cc Sun Jul 18 15:54:48 2021 +0200 +++ b/libgui/src/octave-dock-widget.cc Sun Jul 18 19:20:45 2021 +0200 @@ -103,19 +103,20 @@ m_title_widget->setLayout (h_layout); - if (p) + main_window* mw = oct_qobj.get_main_window (); + if (mw) { // Only connect the when a parent (main window) is given // copy & paste handling - connect (p, SIGNAL (copyClipboard_signal ()), + connect (mw, SIGNAL (copyClipboard_signal ()), this, SLOT (copyClipboard ())); - connect (p, SIGNAL (pasteClipboard_signal ()), + connect (mw, SIGNAL (pasteClipboard_signal ()), this, SLOT (pasteClipboard ())); - connect (p, SIGNAL (selectAll_signal ()), + connect (mw, SIGNAL (selectAll_signal ()), this, SLOT (selectAll ())); // undo handling - connect (p, SIGNAL (undo_signal ()), this, SLOT (do_undo ())); + connect (mw, SIGNAL (undo_signal ()), this, SLOT (do_undo ())); } }