Improve mask visibility selection in GUI

This commit is contained in:
Pandagrapher
2019-01-19 14:11:12 +01:00
parent 9d1104517b
commit fc6e4ceaf1
17 changed files with 309 additions and 263 deletions

View File

@@ -28,7 +28,7 @@
using namespace rtengine::procparams;
ToolPanelCoordinator::ToolPanelCoordinator (bool batch) : ipc (nullptr), favoritePanelSW(nullptr), hasChanged (false), editDataProvider (nullptr)
ToolPanelCoordinator::ToolPanelCoordinator (bool batch) : ipc (nullptr), favoritePanelSW(nullptr), hasChanged (false), editDataProvider (nullptr), photoLoadedOnce(false)
{
favoritePanel = Gtk::manage (new ToolVBox ());
@@ -457,6 +457,12 @@ void ToolPanelCoordinator::panelChanged(const rtengine::ProcEvent& event, const
resize->write(params);
}
// Manage Locallab mask visibility
if (event == rtengine::EvlocallabshowmaskcolMethod || event == rtengine::EvlocallabshowmaskexpMethod) {
Locallab::llMaskVisibility* maskStruc = locallab->getMaskVisibility();
ipc->setLocallabMaskVisibility(maskStruc->colorMask, maskStruc->expMask);
}
ipc->endUpdateParams(changeFlags); // starts the IPC processing
hasChanged = true;
@@ -559,6 +565,12 @@ void ToolPanelCoordinator::profileChange(
gradient->updateGeometry(params->gradient.centerX, params->gradient.centerY, params->gradient.feather, params->gradient.degree, fw, fh);
}
// Reset Locallab mask visibility when a picture is loaded
if (event == rtengine::EvPhotoLoaded) {
locallab->resetMaskVisibility();
ipc->setLocallabMaskVisibility(0, 0);
}
// start the IPC processing
if (filterRawRefresh) {
ipc->endUpdateParams(rtengine::RefreshMapper::getInstance()->getAction(event) & ALLNORAW);