Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/casewin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
17 changes: 11 additions & 6 deletions src/combinecases.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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
Expand Down