remove confusing wxDialog::ButtonSizerFlags and extract button styles properly in each generic dialog implementation instead (closes #9836)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61173 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -290,14 +290,12 @@ bool wxAnyChoiceDialog::Create(wxWindow *parent,
|
||||
const wxPoint& pos,
|
||||
long styleLbox)
|
||||
{
|
||||
#ifdef __WXMAC__
|
||||
// FIXME: why??
|
||||
if ( !wxDialog::Create(parent, wxID_ANY, caption, pos, wxDefaultSize, styleDlg & (~wxCANCEL) ) )
|
||||
return false;
|
||||
#else
|
||||
// extract the buttons styles from the dialog one and remove them from it
|
||||
const long styleBtns = styleDlg & (wxOK | wxCANCEL);
|
||||
styleDlg &= ~styleBtns;
|
||||
|
||||
if ( !wxDialog::Create(parent, wxID_ANY, caption, pos, wxDefaultSize, styleDlg) )
|
||||
return false;
|
||||
#endif
|
||||
|
||||
wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
@@ -316,7 +314,7 @@ bool wxAnyChoiceDialog::Create(wxWindow *parent,
|
||||
|
||||
// 3) buttons if any
|
||||
wxSizer *
|
||||
buttonSizer = CreateSeparatedButtonSizer(styleDlg & ButtonSizerFlags);
|
||||
buttonSizer = CreateSeparatedButtonSizer(styleBtns);
|
||||
if ( buttonSizer )
|
||||
{
|
||||
topsizer->Add(buttonSizer, wxSizerFlags().Expand().DoubleBorder());
|
||||
|
Reference in New Issue
Block a user