X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/638bc56cf906321b2e15b67dc7ea4513895135ed..dbcbe229628c7667da2b6257198467d4f09ab28d:/src/generic/progdlgg.cpp diff --git a/src/generic/progdlgg.cpp b/src/generic/progdlgg.cpp index da963d14fd..4fc3c97542 100644 --- a/src/generic/progdlgg.cpp +++ b/src/generic/progdlgg.cpp @@ -166,7 +166,6 @@ wxProgressDialog::wxProgressDialog(wxString const &title, nTimeLabels++; m_elapsed = CreateLabel(_("Elapsed time : "), &lastWindow); - SetTimeLabel(0, m_elapsed); } if ( style & wxPD_ESTIMATED_TIME ) @@ -241,6 +240,14 @@ wxProgressDialog::wxProgressDialog(wxString const &title, Show(TRUE); Enable(TRUE); // enable this window + // this one can be initialized even if the others are unknown for now + // + // NB: do it after calling Layout() to keep the labels correctly aligned + if ( m_elapsed ) + { + SetTimeLabel(0, m_elapsed); + } + // Update the display (especially on X, GTK) wxYield();