single_top.cpp: re-add lines removed by commit 5fa5a73c, needed in stand-alone.

Otherwise, the main frame created in stand-alone mode is never shown.
This commit is contained in:
jean-pierre charras 2021-06-24 08:58:18 +02:00
parent b532ecec52
commit 450b0c9e27
1 changed files with 8 additions and 0 deletions

View File

@ -369,6 +369,14 @@ bool PGM_SINGLE_TOP::OnPgmInit()
App().SetTopWindow( frame ); // wxApp gets a face.
App().SetAppDisplayName( frame->GetAboutTitle() );
// Allocate a slice of time to show the frame and update wxWidgets widgets
// (especially setting valid sizes) after creating frame and before calling
// OpenProjectFiles() that can update/use some widgets.
// The 2 calls to wxSafeYield are needed on wxGTK for best results.
wxSafeYield();
frame->Show();
wxSafeYield();
// Individual frames may provide additional option/switch processing, but for compatibility,
// any positional arguments are treated as a list of files to pass to OpenProjectFiles
frame->ParseArgs( parser );