[apps/reg] Handle the case where the selected series is < 0

This commit is contained in:
Léa Saviot
2018-06-07 10:07:01 +02:00
committed by Émilie Feral
parent faa52fc66f
commit 822bed9aaf

View File

@@ -47,6 +47,9 @@ I18n::Message GraphController::emptyMessage() {
void GraphController::viewWillAppear() {
InteractiveCurveViewController::viewWillAppear();
if (m_selectedSeries < 0) {
m_selectedSeries = m_store->indexOfKthNonEmptySeries(0);
}
if (*m_selectedDotIndex >= 0) {
m_view.setCursorView(static_cast<View *>(&m_crossCursorView));
} else {