From d7ffab7825f2d306f88e6f2d0b960030a206b20b Mon Sep 17 00:00:00 2001 From: Leland Lucius Date: Tue, 19 May 2015 22:18:07 -0500 Subject: [PATCH] Put the "Debug" button in the right place on OSX --- src/ShuttleGui.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) mode change 100644 => 100755 src/ShuttleGui.cpp diff --git a/src/ShuttleGui.cpp b/src/ShuttleGui.cpp old mode 100644 new mode 100755 index 7519c366c..deb98ed16 --- a/src/ShuttleGui.cpp +++ b/src/ShuttleGui.cpp @@ -2225,18 +2225,23 @@ wxSizer *CreateStdButtonSizer(wxWindow *parent, long buttons, wxWindow *extra) // Add any buttons that need to cuddle up to the right hand cluster if( buttons & eDebugButton ) { + size_t lastLastSpacer = 0; size_t lastSpacer = 0; wxSizerItemList & list = bs->GetChildren(); - for ( size_t i = 0, cnt = list.GetCount(); i < cnt; i++ ) + for( size_t i = 0, cnt = list.GetCount(); i < cnt; i++ ) { - if ( list[i]->IsSpacer() ) + if( list[i]->IsSpacer() ) { lastSpacer = i; } + else + { + lastLastSpacer = lastSpacer; + } } b = new wxButton( parent, eDebugID, _("Debu&g") ); - bs->Insert( lastSpacer + 1, b, 0, wxALIGN_CENTER | wxLEFT | wxRIGHT, margin ); + bs->Insert( lastLastSpacer + 1, b, 0, wxALIGN_CENTER | wxLEFT | wxRIGHT, margin ); } wxSizer * s;