[escher] Palette: factorize data color iteration

This commit is contained in:
Émilie Feral
2020-03-23 18:16:29 +01:00
parent c4847b22cc
commit 886fc98350
9 changed files with 26 additions and 7 deletions

View File

@@ -407,6 +407,7 @@ void GraphController::setRoundCrossCursorView() {
bool round = *m_selectedDotIndex < 0;
if (round) {
// Set the color although the cursor view stays round
assert(*m_selectedSeriesIndex < Palette::numberOfDataColors());
m_roundCursorView.setColor(Palette::DataColor[*m_selectedSeriesIndex]);
}
CursorView * nextCursorView = round ? static_cast<Shared::CursorView *>(&m_roundCursorView) : static_cast<Shared::CursorView *>(&m_crossCursorView);