diff --git a/rtgui/filmnegative.cc b/rtgui/filmnegative.cc index 4c1692bf1..e9c9f4d4c 100644 --- a/rtgui/filmnegative.cc +++ b/rtgui/filmnegative.cc @@ -538,7 +538,7 @@ bool FilmNegative::mouseOver(int modifierKey) { EditDataProvider* const provider = getEditProvider(); EditRectangle* const spotRect = static_cast(visibleGeometry.at(0)); - spotRect->setXYWH(provider->posImage.x - activePicker->get_spot_half_width(), provider->posImage.y - activePicker->get_spot_half_width() ,activePicker->get_spot_half_width() * 2, activePicker->get_spot_half_width() * 2); + spotRect->setXYWH(provider->posImage.x - activePicker->get_spot_half_width(), provider->posImage.y - activePicker->get_spot_half_width() ,activePicker->get_spot_full_width(), activePicker->get_spot_full_width()); return true; } @@ -560,8 +560,8 @@ bool FilmNegative::button1Pressed(int modifierKey) RGB ref1, ref2, dummy; - if (fnp->getFilmNegativeSpot(refSpotCoords[0], picker.get_spot_half_width(), ref1, dummy) && - fnp->getFilmNegativeSpot(refSpotCoords[1], picker.get_spot_half_width(), ref2, dummy)) { + if (fnp->getFilmNegativeSpot(refSpotCoords[0], picker.get_spot_full_width(), ref1, dummy) && + fnp->getFilmNegativeSpot(refSpotCoords[1], picker.get_spot_full_width(), ref2, dummy)) { disableListener(); @@ -607,7 +607,7 @@ bool FilmNegative::button1Pressed(int modifierKey) } RGB refOut; - fnp->getFilmNegativeSpot(provider->posImage, refPicker.get_spot_half_width(), refInputValues, refOut); + fnp->getFilmNegativeSpot(provider->posImage, refPicker.get_spot_full_width(), refInputValues, refOut); // Output luminance of the sampled spot float spotLum = rtengine::Color::rgbLuminance(refOut.r, refOut.g, refOut.b); diff --git a/rtgui/guiutils.h b/rtgui/guiutils.h index 221a56814..02811e076 100644 --- a/rtgui/guiutils.h +++ b/rtgui/guiutils.h @@ -740,6 +740,10 @@ class SpotPicker : public Gtk::Grid { return _spotHalfWidth; } + int get_spot_full_width() const + { + return _spotHalfWidth * 2; + } template void add_button_toggled_event(T_return& returnv, const T_obj function) { _spotButton.signal_toggled().connect(sigc::mem_fun(returnv, function));