prefer most recent season in CP plot

This commit is contained in:
Sean Rhea
2009-11-09 09:54:34 -05:00
parent 82934425ab
commit ae5dd3feb3

View File

@@ -222,6 +222,12 @@ void CriticalPowerWindow::addSeasons()
season = seasons.at(i);
cComboSeason->addItem(season.getName());
}
if (!seasons.empty()) {
cComboSeason->setCurrentIndex(cComboSeason->count() - 1);
Season season = seasons.last();
cpintPlot->setStartDate(season.getStart());
cpintPlot->setEndDate(season.getEnd());
}
}
void CriticalPowerWindow::seasonSelected(int iSeason)