From f7c02af1849eb73b6abdebfd742b75a319f704f4 Mon Sep 17 00:00:00 2001 From: Lawrence Lee Date: Sun, 9 Aug 2020 17:22:23 -0700 Subject: [PATCH] Fix rendering of blank vectorscope --- rtgui/histogrampanel.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rtgui/histogrampanel.cc b/rtgui/histogrampanel.cc index 65e2acfdf..ec8f9a326 100644 --- a/rtgui/histogrampanel.cc +++ b/rtgui/histogrampanel.cc @@ -1367,7 +1367,8 @@ void HistogramArea::drawVectorscope(Cairo::RefPtr &cr, int w, in vect_width * (h - 2 * padding) > vect_height * (w - 2 * padding); const float scope_scale = fit_width ? (w - 2 * padding) / vect_width : (h - 2 * padding) / vect_height; - const float scope_size = scope_scale * max(vect_width, vect_height); + const float scope_size = (vectorscope_scale > 0) ? + scope_scale * max(vect_width, vect_height) : min(w, h) - 2 * padding; const float o_x = (w - scope_scale * vect_width) / 2; const float o_y = (h - scope_scale * vect_height) / 2; const double s = RTScalable::getScale();