diff --git a/src/casewin.cpp b/src/casewin.cpp index 3ae3946bea..5ab6af30d9 100644 --- a/src/casewin.cpp +++ b/src/casewin.cpp @@ -831,8 +831,7 @@ void CaseWindow::DetachCurrentInputPage() wxString CaseWindow::GetInputPage() { - wxArrayString input_pages = GetInputPages(); - wxString input_page = input_pages[m_pageFlipper->GetSelection()]; + wxString input_page = m_inputPageList->GetStringSelection(); // do checks return input_page; } diff --git a/src/combinecases.cpp b/src/combinecases.cpp index 5185bd47b3..4d9fe9f59c 100644 --- a/src/combinecases.cpp +++ b/src/combinecases.cpp @@ -83,7 +83,7 @@ CombineCasesDialog::CombineCasesDialog(wxWindow* parent, const wxString& title, // '\n provide an annual AC degradation rate to use for the combined project,' // '\n or enter a zero to ignore degradation.'; // TODO: make this a SchedNumeric instead so a schedule could be used - m_spndDegradation = new wxSpinCtrlDouble(this, ID_spndDegradation, "Annual AC Degradation", wxDefaultPosition, wxSize(54, 22), + m_spndDegradation = new wxSpinCtrlDouble(this, ID_spndDegradation, "Annual AC Degradation", wxDefaultPosition, wxSize(54, 28), wxSP_ARROW_KEYS, 0, 100, m_generic_degradation[0], 0.1, "wxspndDegradation"); wxString degradation_label = "%/year Annual AC degradation rate"; wxBoxSizer* szdegradation = new wxBoxSizer(wxHORIZONTAL); @@ -205,9 +205,14 @@ void CombineCasesDialog::OnEvt(wxCommandEvent& e) inflation_vv->Set(inflation); } - // Simulate - bcsim.Clear(); - bool ok = bcsim.Invoke(); + bool ok = false; + { + wxBusyCursor wait; + + // Simulate + bcsim.Clear(); + ok = bcsim.Invoke(true); // true to suppress flux map simulation dialog + } // check that the case ran if (!ok) { @@ -361,8 +366,8 @@ void CombineCasesDialog::OnEvt(wxCommandEvent& e) // Update UI with results case_window->UpdateResults(); - //case_window->SwitchToInputPage("case_page_orig"); // TODO: switch to original page (how to get current page?) - case_window->SwitchToPage("results"); + case_window->SwitchToInputPage(case_page_orig); // switch to original page + case_window->SwitchToPage("results"); // this overwrites the input page selection but input page selected is still highlighted } //For user benefit, change the fixed O&M schedule back to a single value if all entries are the same