From cb45ab59d203e4f9b3da7fd8d05f8c554e4a42d0 Mon Sep 17 00:00:00 2001 From: Charlie Fenton Date: Tue, 20 Mar 2018 02:01:28 -0700 Subject: [PATCH] Mac: Fix wxWidgets 3.1.0 Mac-only bug when wxStaticBox has no label (this bug has been fixed in wxWidgets 3.1.1) --- mac_build/buildWxMac.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/mac_build/buildWxMac.sh b/mac_build/buildWxMac.sh index 9a1578b018..d0a9e584c2 100644 --- a/mac_build/buildWxMac.sh +++ b/mac_build/buildWxMac.sh @@ -35,6 +35,7 @@ # Build 64-bit library (temporarily build both 32-bit and 64-bit libraries) 10/22/17 # Update for wxCocoa 3.1.0 10/25/17 # Build only 64-bit library 1/25/18 +# Fix wxWidgets 3.1.0 bug when wxStaticBox has no label 3/20/18 # ## This script requires OS 10.6 or later ## @@ -132,6 +133,29 @@ else echo "build/osx/setup/cocoa/include/wx/setup.h already patched" fi +# Patch src/osx/window_osx.cpp window_osx_patched.cpp > window_osx_cpp_diff +if [ ! -f src/osx/window_osx.cpp.orig ]; then + cat >> /tmp/window_osx_cpp_diff << ENDOFFILE +--- window_osx.cpp 2016-02-28 13:33:37.000000000 -0800 ++++ window_osx_patched.cpp 2018-03-20 01:17:35.000000000 -0700 +@@ -353,7 +353,8 @@ + if ( !m_hasFont ) + DoSetWindowVariant( m_windowVariant ); + +- if ( !m_label.empty() ) ++// Fix wxWidgets 3.1.0 bug drawing wxStaticBox with empty label (fixed in wxWidgets 3.1.1) ++// if ( !m_label.empty() ) + GetPeer()->SetLabel( wxStripMenuCodes(m_label, wxStrip_Mnemonics), GetFont().GetEncoding() ) ; + + // for controls we want to use best size for wxDefaultSize params ) +ENDOFFILE + patch -bfi /tmp/window_osx_cpp_diff src/osx/window_osx.cpp + rm -f /tmp/window_osx_cpp_diff +else + echo "src/osx/window_osx.cpp already patched" +fi + + echo "" doclean=""