X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e822d1bd5fc4f3ac91fafd201d7519d091408dd2..b53aea81d2e102224b452ef5bf7aee1132f37c6f:/src/common/dlgcmn.cpp diff --git a/src/common/dlgcmn.cpp b/src/common/dlgcmn.cpp index d99c8c0880..aa25908a2b 100644 --- a/src/common/dlgcmn.cpp +++ b/src/common/dlgcmn.cpp @@ -480,7 +480,17 @@ void wxDialogBase::OnSysColourChanged(wxSysColourChangedEvent& event) bool wxDialogBase::DoLayoutAdaptation() { if (GetLayoutAdapter()) - return GetLayoutAdapter()->DoLayoutAdaptation((wxDialog*) this); + { + wxWindow* focusWindow = wxFindFocusDescendant(this); // from event.h + if (GetLayoutAdapter()->DoLayoutAdaptation((wxDialog*) this)) + { + if (focusWindow) + focusWindow->SetFocus(); + return true; + } + else + return false; + } else return false; }