Show/hide contrast mask, still wrong icon on button

This commit is contained in:
heckflosse
2018-06-13 13:02:10 +02:00
parent 44729edf04
commit 1b094a084a
6 changed files with 22 additions and 0 deletions

View File

@@ -560,6 +560,14 @@ void ImageArea::spotWBSelected (int x, int y)
}
}
void ImageArea::sharpMaskSelected (bool sharpMask)
{
if (listener) {
listener->sharpMaskSelected (sharpMask);
}
}
void ImageArea::getScrollImageSize (int& w, int& h)
{

View File

@@ -131,6 +131,7 @@ public:
void setToolHand ();
void straightenReady (double rotDeg);
void spotWBSelected (int x, int y);
void sharpMaskSelected (bool sharpMask);
int getSpotWBRectSize ();
void redraw ();

View File

@@ -29,6 +29,7 @@ class ImageAreaToolListener
public:
virtual ~ImageAreaToolListener() {}
virtual void spotWBselected (int x, int y, Thumbnail* thm = nullptr) {}
virtual void sharpMaskSelected (bool sharpMask) {}
virtual int getSpotWBRectSize ()
{
return 8;

View File

@@ -127,6 +127,7 @@ void IndicateClippedPanel::buttonToggled (Gtk::ToggleButton* tb)
indClippedH->set_active(false);
}
previewFocusMask->set_active(false);
imageArea->sharpMaskSelected(previewSharpMask->get_active());
} else {
previewFocusMask->set_active(false);
previewSharpMask->set_active(false);

View File

@@ -656,6 +656,16 @@ void ToolPanelCoordinator::spotWBselected (int x, int y, Thumbnail* thm)
}
}
void ToolPanelCoordinator::sharpMaskSelected(bool sharpMask)
{
if (!ipc) {
return;
}
ipc->beginUpdateParams ();
ipc->setSharpMask(sharpMask);
ipc->endUpdateParams (rtengine::EvShrEnabled);
}

View File

@@ -280,6 +280,7 @@ public:
// imageareatoollistener interface
void spotWBselected (int x, int y, Thumbnail* thm = nullptr);
void sharpMaskSelected (bool sharpMask);
void cropSelectionReady ();
void rotateSelectionReady (double rotate_deg, Thumbnail* thm = nullptr);
ToolBar* getToolBar ()