From 79707ed1ea89bb27bcfe559cfd96568cdd283e85 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Thu, 23 Aug 2018 16:11:11 +0200 Subject: [PATCH] Fix broken RGB indicator bar --- rtgui/histogrampanel.cc | 5 ++--- rtgui/histogrampanel.h | 2 +- rtgui/pointermotionlistener.h | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/rtgui/histogrampanel.cc b/rtgui/histogrampanel.cc index 471e696fc..a38fb50ae 100644 --- a/rtgui/histogrampanel.cc +++ b/rtgui/histogrampanel.cc @@ -353,18 +353,17 @@ void HistogramPanel::toggleFreeze () return; } -void HistogramPanel::pointerMoved (bool validPos, Glib::ustring profile, Glib::ustring profileW, int x, int y, int r, int g, int b) +void HistogramPanel::pointerMoved (bool validPos, const Glib::ustring &profile, const Glib::ustring &profileW, int x, int y, int r, int g, int b, bool isRaw) { if (!validPos) { // do something to un-show vertical bars histogramRGBArea->updateBackBuffer(-1, -1, -1); - histogramRGBArea->queue_draw (); } else { // do something to show vertical bars histogramRGBArea->updateBackBuffer(r, g, b, profile, profileW); - histogramRGBArea->queue_draw (); } + histogramRGBArea->queue_draw (); } /* diff --git a/rtgui/histogrampanel.h b/rtgui/histogrampanel.h index 0ce62956c..7600e2f23 100644 --- a/rtgui/histogrampanel.h +++ b/rtgui/histogrampanel.h @@ -197,7 +197,7 @@ public: histogramArea->update (histRed, histGreen, histBlue, histLuma, histRedRaw, histGreenRaw, histBlueRaw, histChroma); } // pointermotionlistener interface - void pointerMoved (bool validPos, Glib::ustring profile, Glib::ustring profileW, int x, int y, int r, int g, int b); + void pointerMoved (bool validPos, const Glib::ustring &profile, const Glib::ustring &profileW, int x, int y, int r, int g, int b, bool isRaw = false); // added pointermotionlistener interface void toggleFreeze(); // TODO should be protected diff --git a/rtgui/pointermotionlistener.h b/rtgui/pointermotionlistener.h index 7a275972d..6db59b6cf 100644 --- a/rtgui/pointermotionlistener.h +++ b/rtgui/pointermotionlistener.h @@ -27,7 +27,7 @@ protected: public: virtual ~PointerMotionListener() {} - virtual void pointerMoved (bool validPos, const Glib::ustring &profile, const Glib::ustring &profileW, int x, int y, int r, int g, int b, bool isRaw = false) {} + virtual void pointerMoved (bool validPos, const Glib::ustring &profile, const Glib::ustring &profileW, int x, int y, int r, int g, int b, bool isRaw = false) = 0; virtual void toggleFreeze () {} virtual void getRGBText (int r, int g, int b, Glib::ustring &sR, Glib::ustring &sG, Glib::ustring &sB, bool isRaw = false) { sR = "--"; sG = "--"; sB = "--"; } virtual void getHSVText (float h, float s, float v, Glib::ustring &sH, Glib::ustring &sS, Glib::ustring &sV) { sH = "--"; sS = "--"; sV = "--"; }