disable 'autofill' setting when using lensfun

This commit is contained in:
Alberto Griggio
2017-09-10 14:02:22 +02:00
parent 0761499557
commit 626f8cace3
3 changed files with 23 additions and 9 deletions

View File

@@ -44,6 +44,8 @@ public:
return packBox;
}
Gtk::CheckButton *getFill() { return fill; }
void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr);
void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr);
void setBatchMode (bool batchMode);

View File

@@ -210,16 +210,8 @@ void LensProfilePanel::read(const rtengine::procparams::ProcParams* pp, const Pa
if (corrLensfunManual->get_active() && !checkLensfunCanCorrect(false)) {
corrOff->set_active(true);
}
// if (metadata) {
// std::unique_ptr<LFModifier> mod(LFDatabase::findModifier(pp->lensProf, metadata, 100, 100, pp->coarse, -1));
// if (!mod) {
// if (pp->lensProf.useLensfun) {
// corrOff->set_active(true);
// }
// corrLensfunAuto->set_sensitive(false);
// }
// }
setAutoFill();
enableListener ();
conUseDist.block(false);
}
@@ -514,6 +506,8 @@ void LensProfilePanel::onCorrModeChanged()
mode = M("GENERAL_UNCHANGED");
}
setAutoFill();
if (listener) {
listener->panelChanged(EvLensCorrMode, mode);
@@ -534,6 +528,23 @@ 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

@@ -87,6 +87,7 @@ protected:
bool setLensfunCamera(const Glib::ustring &make, const Glib::ustring &model);
bool setLensfunLens(const Glib::ustring &lens);
bool checkLensfunCanCorrect(bool automatch);
void setAutoFill();
public: