merged 2.4 branch into the trunk

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18040 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2002-12-04 14:11:26 +00:00
parent 59a944cb63
commit 2b5f62a0b2
1057 changed files with 37805 additions and 24034 deletions

View File

@@ -247,6 +247,12 @@ void wxDialog::DoShowModal()
m_windowDisabler = new wxWindowDisabler(this);
// before entering the modal loop, reset the "is in OnIdle()" flag (see
// comment in app.cpp)
extern bool wxIsInOnIdleFlag;
bool wasInOnIdle = wxIsInOnIdleFlag;
wxIsInOnIdleFlag = FALSE;
// enter the modal loop
while ( IsModalShowing() )
{
@@ -261,6 +267,8 @@ void wxDialog::DoShowModal()
wxTheApp->DoMessage();
}
wxIsInOnIdleFlag = wasInOnIdle;
// and restore focus
// Note that this code MUST NOT access the dialog object's data
// in case the object has been deleted (which will be the case
@@ -296,6 +304,14 @@ bool wxDialog::Show(bool show)
if ( show )
{
// dialogs don't get WM_SIZE message after creation unlike most (all?)
// other windows and so could start their life non laid out correctly
// if we didn't call Layout() from here
//
// NB: normally we should call it just the first time but doing it
// every time is simpler than keeping a flag
Layout();
// usually will result in TransferDataToWindow() being called
InitDialog();
}