made lensfun-based correction compatible with auto fill mode

This commit is contained in:
Alberto Griggio
2017-09-10 22:02:43 +02:00
parent 489b641c8b
commit e4ba4d19f5
7 changed files with 2 additions and 35 deletions

View File

@@ -39,7 +39,6 @@ LensProfilePanel::LensProfilePanel () :
useCAChanged(false),
isRaw(true),
metadata(nullptr),
lensgeomLcpFill(nullptr),
useLensfunChanged(false),
lensfunAutoChanged(false),
lensfunCameraChanged(false),
@@ -220,7 +219,6 @@ void LensProfilePanel::read(const rtengine::procparams::ProcParams* pp, const Pa
corrOff->set_active(true);
}
setAutoFill();
enableListener ();
conUseDist.block(false);
}
@@ -516,8 +514,6 @@ void LensProfilePanel::onCorrModeChanged()
mode = M("GENERAL_UNCHANGED");
}
setAutoFill();
if (listener) {
listener->panelChanged(EvLensCorrMode, mode);
}
@@ -537,23 +533,6 @@ bool LensProfilePanel::checkLensfunCanCorrect(bool automatch)
}
void LensProfilePanel::setAutoFill()
{
if (lensgeomLcpFill) {
bool b = lensgeomLcpFill->disableListener();
if (corrLensfunAuto->get_active() || corrLensfunManual->get_active()) {
lensgeomLcpFill->getFill()->set_active(true);
lensgeomLcpFill->getFill()->set_sensitive(false);
} else {
lensgeomLcpFill->getFill()->set_sensitive(true);
}
if (b) {
lensgeomLcpFill->enableListener();
}
}
}
//-----------------------------------------------------------------------------
// LFDbHelper
//-----------------------------------------------------------------------------

View File

@@ -40,7 +40,6 @@ protected:
bool allowFocusDep;
bool isRaw;
const rtengine::ImageMetaData* metadata;
LensGeometry *lensgeomLcpFill;
Gtk::RadioButton::Group corrGroup;
Gtk::RadioButton *corrOff;
@@ -87,7 +86,6 @@ protected:
bool setLensfunCamera(const Glib::ustring &make, const Glib::ustring &model);
bool setLensfunLens(const Glib::ustring &lens);
bool checkLensfunCanCorrect(bool automatch);
void setAutoFill();
public:
@@ -102,10 +100,6 @@ public:
void onUseDistChanged();
void onUseVignChanged();
void onUseCAChanged();
void setLensGeomRef( LensGeometry *foo)
{
lensgeomLcpFill = foo ;
};
void setBatchMode(bool yes);

View File

@@ -53,7 +53,6 @@ ToolPanelCoordinator::ToolPanelCoordinator () : ipc (nullptr), hasChanged (false
colortoning = Gtk::manage (new ColorToning ());
lensgeom = Gtk::manage (new LensGeometry ());
lensProf = Gtk::manage (new LensProfilePanel ());
lensProf->setLensGeomRef (lensgeom);
distortion = Gtk::manage (new Distortion ());
rotate = Gtk::manage (new Rotate ());
vibrance = Gtk::manage (new Vibrance ());