diff libgui/src/m-editor/file-editor-tab.h @ 28382:2b52e473b6ef stable

fix focus issues in editor due to qt bug with focus proxy chains (bug #57635) * file-editor-tab.cc (file_editor_tab): initialize flag for actuve lists, do not set a focus proxy; (show_auto_completion): set flag for active list; (handle_cursor_moved): test for active list and emit signal if a list was closed * file-editor-tab.h: new flag m_atuoc_active and new signal autoc_closed * file-editor.cc (activate): do not emit signal for focussing current editor tab but call new method reset_focus where the signal is emitted; (handle_editor_state_changed): do not set a focus proxy; (construct): set tab widget as focus proxy; (handle_autoc_cancelled): slot for signal when auto-completion list is cancelled, complete the list for really closing it; (reset_focus): new method for resetting focus to the editor tab (make_file_editor_tab): connect signals for cancelled, completed and closed auto-completion list to related new slots (foucsInEvent): reimplemented event for setting the foucs to the edit tab and its edit area * file-editor.h: new slots handle_autoc_cancelled and reset_focus, reimplemented focusInEvent
author Torsten Lilge <ttl-octave@mailbox.org>
date Tue, 26 May 2020 06:59:45 +0200
parents bd51beb6205e
children f3200b8cff19 0a5b15007766
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor-tab.h	Mon May 25 14:53:54 2020 -0700
+++ b/libgui/src/m-editor/file-editor-tab.h	Tue May 26 06:59:45 2020 +0200
@@ -86,6 +86,8 @@
     void edit_mfile_request (const QString&, const QString&,
                              const QString&, int);
 
+    void autoc_closed (void);
+
     void update_breakpoints_signal (const octave_value_list& args);
 
     void remove_breakpoint_via_debugger_linenr (int debugger_linenr);
@@ -314,6 +316,7 @@
     QString m_new_encoding;
     QDateTime m_last_modified;
 
+    bool m_autoc_active;
     bool m_long_title;
     bool m_copy_available;
     bool m_is_octave_file;