From 450b0c9e27644732a1c4be17b758c9d2c90df067 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Thu, 24 Jun 2021 08:58:18 +0200 Subject: [PATCH] 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. --- common/single_top.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/common/single_top.cpp b/common/single_top.cpp index 4cf00b8514..30da289073 100644 --- a/common/single_top.cpp +++ b/common/single_top.cpp @@ -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 );