comparison libgui/src/variable-editor.h @ 25220:07bddddc5856 stable

Restore Variable Editor focusWidget lost in dock/undock transition (bug #53410) * variable-editor.cc (variable_editor::variable_editor): Initialize new member variable m_variable_focus_widget to nullptr. (variable_editor::focusInEvent): If the m_main window's focusWidget() is nullptr, check if the recorded m_variable_focus_widget is still valid within the m_main container. If so, use it as a valid pointer and restore its focus. (variable_editor::focusOutEvent): Record m_main's focusWidget() just prior to transition to/from docked state. * variable-editor.h (variable_editor:octave_dock_widget): A class member variable m_variable_focus_widget to keep track of focusWidget().
author Daniel J Sebald <daniel.sebald@ieee.org>
date Tue, 10 Apr 2018 23:22:03 -0500
parents 8cff7eceee87
children 05a690606fd5
comparison
equal deleted inserted replaced
25218:164399071f4d 25220:07bddddc5856
336 336
337 protected: 337 protected:
338 338
339 void focusInEvent (QFocusEvent *ev); 339 void focusInEvent (QFocusEvent *ev);
340 340
341 void focusOutEvent (QFocusEvent *ev);
342
341 private: 343 private:
342 344
343 QAction * add_action (QMenu *menu, const QIcon& icon, const QString& text, 345 QAction * add_action (QMenu *menu, const QIcon& icon, const QString& text,
344 const char *member); 346 const char *member);
345 347
375 void construct_tool_bar (void); 377 void construct_tool_bar (void);
376 378
377 QString m_current_focus_vname; 379 QString m_current_focus_vname;
378 380
379 QString m_hovered_focus_vname; 381 QString m_hovered_focus_vname;
382
383 QWidget *m_variable_focus_widget;
380 }; 384 };
381 } 385 }
382 386
383 #endif 387 #endif