From 49c177be6bf3a8ea148db4897f22178672eceb4b Mon Sep 17 00:00:00 2001 From: lsv Date: Fri, 2 Feb 2024 16:56:50 +0500 Subject: [PATCH] fix lost focus SQL editor. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit При потере фокуса окна редактора запроса, вернуть его можно было только нажав на окно левой кнопкой мыши. Теперь это можно сделать нажав на имя закладки. --- include/ctl/ctlAuiNotebook.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/ctl/ctlAuiNotebook.h b/include/ctl/ctlAuiNotebook.h index 9f2684d..d220d41 100644 --- a/include/ctl/ctlAuiNotebook.h +++ b/include/ctl/ctlAuiNotebook.h @@ -25,6 +25,15 @@ class ctlAuiNotebook : public wxAuiNotebook public: ctlAuiNotebook(wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = wxAUI_NB_DEFAULT_STYLE) : wxAuiNotebook(parent, id, pos, size, style) { } + int DoModifySelection(size_t n, bool events) wxOVERRIDE + { + if (n == m_curPage) + { + SetFocus(); + return m_curPage; + } + return wxAuiNotebook::DoModifySelection(n, events); + } protected: void OnChildFocus(wxChildFocusEvent &evt);