[apps/stats] Fix histogram dirty tracking

This commit is contained in:
Léa Saviot
2018-05-23 11:30:59 +02:00
parent 8980a7d90a
commit a9ec0a3805
2 changed files with 2 additions and 1 deletions

View File

@@ -30,6 +30,7 @@ public:
void setCursorView(View * cursorView);
void setBannerView(View * bannerView);
void setDisplayBannerView(bool display) { m_displayBanner = display; }
bool displayBannerView() const { return m_displayBanner; }
void setOkView(View * okView);
float resolution() const;
protected:

View File

@@ -25,7 +25,7 @@ void HistogramView::reload() {
/* We deliberately do not mark as dirty the frame of the banner view to avoid
*unpleasant blinking of the drawing of the banner view. */
KDRect dirtyZone(KDRect(pixelLowerBound, 0, pixelUpperBound-pixelLowerBound,
bounds().height()-m_bannerView->bounds().height()));
bounds().height() - (displayBannerView() ? m_bannerView->bounds().height() : 0)));
markRectAsDirty(dirtyZone);
}