From f469d02f47ec016fb5f664d213bd32a74c48d642 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Wed, 22 Sep 2021 11:44:49 -0700 Subject: [PATCH] Force fitting of the Python window Test commit to see if this fixes an issue for macs Fixes https://gitlab.com/kicad/code/kicad/issues/8622 --- scripting/kipython_frame.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripting/kipython_frame.cpp b/scripting/kipython_frame.cpp index abb5ebb84d..0cc8f4effd 100644 --- a/scripting/kipython_frame.cpp +++ b/scripting/kipython_frame.cpp @@ -54,6 +54,11 @@ sys.path.append( stock_path ) // Execute the code to make the makeWindow function we defined above PyRun_SimpleString( pcbnew_pyshell_one_step.str().c_str() ); + + /// For unknown reasons, some mac builds don't automatically layout the Python window until resized + /// so force the fit here + Layout(); + Fit(); }