Restore control focus after adaptation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58255 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -480,7 +480,17 @@ void wxDialogBase::OnSysColourChanged(wxSysColourChangedEvent& event)
|
|||||||
bool wxDialogBase::DoLayoutAdaptation()
|
bool wxDialogBase::DoLayoutAdaptation()
|
||||||
{
|
{
|
||||||
if (GetLayoutAdapter())
|
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
|
else
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user