X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cfd1ac216d14febc1278a48d116b1218efe0316b..abb4f9c93715f5b00c526203af96ed2938a1a2c3:/src/common/dlgcmn.cpp diff --git a/src/common/dlgcmn.cpp b/src/common/dlgcmn.cpp index 8ac52135d9..ba4e88cbbe 100644 --- a/src/common/dlgcmn.cpp +++ b/src/common/dlgcmn.cpp @@ -17,10 +17,6 @@ // headers // ---------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma implementation "dialogbase.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -112,7 +108,8 @@ void wxDialogBase::Init() { m_returnCode = 0; m_affirmativeId = wxID_OK; - + m_escapeId = wxID_ANY; + // the dialogs have this flag on by default to prevent the events from the // dialog controls from reaching the parent frame which is usually // undesirable and can lead to unexpected and hard to find bugs @@ -336,8 +333,6 @@ wxStdDialogButtonSizer *wxDialogBase::CreateStdDialogButtonSizer( long flags ) sizer->AddButton(help); } - sizer->Realize(); - if (flags & wxNO_DEFAULT) { if (no) @@ -359,12 +354,14 @@ wxStdDialogButtonSizer *wxDialogBase::CreateStdDialogButtonSizer( long flags ) yes->SetFocus(); } } - + if (flags & wxOK) SetAffirmativeId(wxID_OK); else if (flags & wxYES) SetAffirmativeId(wxID_YES); + sizer->Realize(); + return sizer; }