@@ -151,42 +151,42 @@ CaseWindow::CaseWindow( wxWindow *parent, Case *c )
151
151
152
152
wxColour lafore ( *wxWHITE ), laback ( 100 ,100 ,100 );
153
153
154
- wxPanel *left_panel = new wxPanel ( this );
155
- left_panel ->SetBackgroundColour ( laback );
154
+ m_left_panel = new wxPanel (this );
155
+ m_left_panel ->SetBackgroundColour ( laback );
156
156
157
- m_inputPageList = new InputPageList ( left_panel , ID_INPUTPAGELIST );
157
+ m_inputPageList = new InputPageList ( m_left_panel , ID_INPUTPAGELIST );
158
158
m_inputPageList->SetCaseWindow ( this );
159
159
m_inputPageList->SetBackgroundColour ( wxColour (243 ,243 ,243 ) );
160
160
161
161
wxFont lafont ( *wxNORMAL_FONT );
162
162
lafont.SetWeight ( wxFONTWEIGHT_BOLD );
163
- m_configLabel = new wxStaticText ( left_panel , wxID_ANY, " -technology-" );
163
+ m_configLabel = new wxStaticText ( m_left_panel , wxID_ANY, " -technology-" );
164
164
m_configLabel->SetBackgroundColour ( laback );
165
165
m_configLabel->SetForegroundColour ( lafore );
166
166
m_configLabel->SetFont ( lafont );
167
167
168
168
169
169
170
- m_simButton = new wxMetroButton ( left_panel , ID_SIMULATE, " Simulate" , wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxMB_RIGHTARROW );
170
+ m_simButton = new wxMetroButton ( m_left_panel , ID_SIMULATE, " Simulate" , wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxMB_RIGHTARROW );
171
171
m_simButton->SetFont ( wxMetroTheme::Font ( wxMT_NORMAL, 14 ) );
172
- m_resultsButton = new wxMetroButton ( left_panel , ID_RESULTSPAGE, wxEmptyString, wxBITMAP_PNG_FROM_DATA ( graph ) );
172
+ m_resultsButton = new wxMetroButton ( m_left_panel , ID_RESULTSPAGE, wxEmptyString, wxBITMAP_PNG_FROM_DATA ( graph ) );
173
173
174
174
wxBoxSizer *szhl = new wxBoxSizer ( wxHORIZONTAL );
175
175
szhl->Add ( m_simButton, 1 , wxALL|wxEXPAND, 0 );
176
176
szhl->Add ( m_resultsButton, 0 , wxALL|wxEXPAND, 0 );
177
177
178
178
wxSizer *szsims = new wxGridSizer (2 , 0 , 0 );
179
- szsims->Add ( new wxMetroButton ( left_panel , ID_PARAMETRICS, " Parametrics" ), 0 , wxALL|wxEXPAND, 0 );
180
- szsims->Add ( new wxMetroButton ( left_panel , ID_STOCHASTIC, " Stochastic" ), 0 , wxALL|wxEXPAND, 0 );
181
- szsims->Add ( new wxMetroButton ( left_panel , ID_P50P90, " P50 / P90" ), 0 , wxALL|wxEXPAND, 0 );
182
- szsims->Add ( new wxMetroButton ( left_panel , ID_MACRO, " Macros" ), 0 , wxALL|wxEXPAND, 0 );
179
+ szsims->Add ( new wxMetroButton (m_left_panel , ID_PARAMETRICS, " Parametrics" ), 0 , wxALL|wxEXPAND, 0 );
180
+ szsims->Add ( new wxMetroButton (m_left_panel , ID_STOCHASTIC, " Stochastic" ), 0 , wxALL|wxEXPAND, 0 );
181
+ szsims->Add ( new wxMetroButton (m_left_panel , ID_P50P90, " P50 / P90" ), 0 , wxALL|wxEXPAND, 0 );
182
+ szsims->Add ( new wxMetroButton (m_left_panel , ID_MACRO, " Macros" ), 0 , wxALL|wxEXPAND, 0 );
183
183
184
184
wxBoxSizer *szvl = new wxBoxSizer ( wxVERTICAL );
185
185
szvl->Add ( m_configLabel, 0 , wxALIGN_CENTER|wxTOP|wxBOTTOM, 3 );
186
186
szvl->Add ( m_inputPageList, 1 , wxALL|wxEXPAND, 0 );
187
187
szvl->Add ( szhl, 0 , wxALL|wxEXPAND, 0 );
188
188
szvl->Add ( szsims, 0 , wxALL|wxEXPAND, 0 );
189
- left_panel ->SetSizer ( szvl );
189
+ m_left_panel ->SetSizer ( szvl );
190
190
191
191
m_pageFlipper = new wxSimplebook ( this , ID_PAGES, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE );
192
192
@@ -227,7 +227,7 @@ CaseWindow::CaseWindow( wxWindow *parent, Case *c )
227
227
wxDevicePPIToScale ( wxClientDC (this ).GetPPI (), &xScale, &yScale );
228
228
229
229
SetMinimumPaneSize ( 50 );
230
- SplitVertically ( left_panel , m_pageFlipper, (int )(210 *xScale) );
230
+ SplitVertically ( m_left_panel , m_pageFlipper, (int )(210 *xScale) );
231
231
232
232
233
233
m_pageNote = new PageNote ( this );
@@ -716,6 +716,7 @@ void CaseWindow::OnCaseEvent( Case *, CaseEvent &evt )
716
716
{
717
717
wxString sel = m_inputPageList->GetStringSelection ();
718
718
UpdateConfiguration ();
719
+
719
720
if (!sel.empty ())
720
721
SwitchToInputPage ( sel );
721
722
else
@@ -733,6 +734,9 @@ void CaseWindow::OnCaseEvent( Case *, CaseEvent &evt )
733
734
m_macros->ConfigurationChanged ();
734
735
735
736
SamApp::Project ().SetModified ( true );
737
+
738
+ m_left_panel->Layout ();
739
+
736
740
}
737
741
else if ( evt.GetType () == CaseEvent::SAVE_NOTIFICATION )
738
742
{
0 commit comments