[apps/stats] Fix drawin and reloading

This commit is contained in:
Léa Saviot
2018-05-29 17:30:58 +02:00
parent e1b39b6f3a
commit e295dd678e
3 changed files with 3 additions and 4 deletions

View File

@@ -48,7 +48,7 @@ void BoxView::reload() {
KDCoordinate maxY = boxUpperBoundPixel();
KDCoordinate minX = std::round(floatToPixel(Axis::Horizontal, m_store->minValue(m_series)));
KDCoordinate maxX = std::round(floatToPixel(Axis::Horizontal, m_store->maxValue(m_series)));
KDRect dirtyRect = KDRect(minX, minY, maxX - minX + k_quantileBarWidth, maxY - minY + k_quantileBarWidth);
KDRect dirtyRect = KDRect(minX, minY, maxX - minX + k_quantileBarWidth, maxY - minY);
markRectAsDirty(dirtyRect);
}

View File

@@ -172,6 +172,7 @@ bool HistogramController::moveSelectionHorizontally(int deltaIndex) {
if (m_store->scrollToSelectedBarIndex(selectedSeries(), *m_selectedBarIndex)) {
multipleDataView()->reload();
}
reloadBannerView();
return true;
}
return false;

View File

@@ -67,9 +67,7 @@ bool MultipleDataViewController::handleEvent(Ion::Events::Event event) {
}
if (m_selectedSeries >= 0 && (event == Ion::Events::Left || event == Ion::Events::Right)) {
int direction = event == Ion::Events::Left ? -1 : 1;
if (moveSelectionHorizontally(direction)) {
reloadBannerView();
}
moveSelectionHorizontally(direction);
return true;
}
return false;