adjust the labels before centering the dialog as doing it can change the dialog size
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55487 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -98,15 +98,16 @@ wxMessageDialog::HookFunction(int code, WXWPARAM wParam, WXLPARAM lParam)
|
|||||||
|
|
||||||
wnd->SetHWND((HWND)wParam);
|
wnd->SetHWND((HWND)wParam);
|
||||||
|
|
||||||
|
// update the labels if necessary: we need to do it before centering
|
||||||
|
// the dialog as this can change its size
|
||||||
|
if ( wnd->HasCustomLabels() )
|
||||||
|
wnd->AdjustButtonLabels();
|
||||||
|
|
||||||
// centre the message box on its parent if requested
|
// centre the message box on its parent if requested
|
||||||
if ( wnd->GetMessageDialogStyle() & wxCENTER )
|
if ( wnd->GetMessageDialogStyle() & wxCENTER )
|
||||||
wnd->Center(); // center on parent
|
wnd->Center(); // center on parent
|
||||||
//else: default behaviour, center on screen
|
//else: default behaviour, center on screen
|
||||||
|
|
||||||
// also update the labels if necessary
|
|
||||||
if ( wnd->HasCustomLabels() )
|
|
||||||
wnd->AdjustButtonLabels();
|
|
||||||
|
|
||||||
// there seems to be no reason to leave it set
|
// there seems to be no reason to leave it set
|
||||||
wnd->SetHWND(NULL);
|
wnd->SetHWND(NULL);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user