Batch mode fixed
This commit is contained in:
parent
0f6edfe8dd
commit
66e9014238
@ -179,7 +179,7 @@ void LensProfilePanel::read(const rtengine::procparams::ProcParams* pp, const Pa
|
|||||||
disableListener();
|
disableListener();
|
||||||
conUseDist.block(true);
|
conUseDist.block(true);
|
||||||
|
|
||||||
corrLensfunAutoRB->set_sensitive(true);
|
// corrLensfunAutoRB->set_sensitive(true);
|
||||||
|
|
||||||
switch (pp->lensProf.lcMode) {
|
switch (pp->lensProf.lcMode) {
|
||||||
case procparams::LensProfParams::LcMode::LCP: {
|
case procparams::LensProfParams::LcMode::LCP: {
|
||||||
@ -190,6 +190,9 @@ void LensProfilePanel::read(const rtengine::procparams::ProcParams* pp, const Pa
|
|||||||
|
|
||||||
case procparams::LensProfParams::LcMode::LENSFUNAUTOMATCH: {
|
case procparams::LensProfParams::LcMode::LENSFUNAUTOMATCH: {
|
||||||
corrLensfunAutoRB->set_active(true);
|
corrLensfunAutoRB->set_active(true);
|
||||||
|
if (batchMode) {
|
||||||
|
setManualParamsVisibility(false);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -204,6 +207,10 @@ void LensProfilePanel::read(const rtengine::procparams::ProcParams* pp, const Pa
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (multiImage) {
|
||||||
|
corrUnchangedRB->set_active(true);
|
||||||
|
}
|
||||||
|
|
||||||
if (pp->lensProf.lcpFile.empty()) {
|
if (pp->lensProf.lcpFile.empty()) {
|
||||||
const Glib::ustring lastFolder = corrLcpFileChooser->get_current_folder();
|
const Glib::ustring lastFolder = corrLcpFileChooser->get_current_folder();
|
||||||
@ -227,24 +234,29 @@ void LensProfilePanel::read(const rtengine::procparams::ProcParams* pp, const Pa
|
|||||||
const LFDatabase* const db = LFDatabase::getInstance();
|
const LFDatabase* const db = LFDatabase::getInstance();
|
||||||
LFCamera c;
|
LFCamera c;
|
||||||
|
|
||||||
if (!setLensfunCamera(pp->lensProf.lfCameraMake, pp->lensProf.lfCameraModel) && !pp->lensProf.lfManual()) {
|
if (pp->lensProf.lfAutoMatch()) {
|
||||||
if (metadata) {
|
if (metadata) {
|
||||||
c = db->findCamera(metadata->getMake(), metadata->getModel());
|
c = db->findCamera(metadata->getMake(), metadata->getModel());
|
||||||
setLensfunCamera(c.getMake(), c.getModel());
|
setLensfunCamera(c.getMake(), c.getModel());
|
||||||
}
|
}
|
||||||
|
} else if (pp->lensProf.lfManual()) {
|
||||||
|
setLensfunCamera(pp->lensProf.lfCameraMake, pp->lensProf.lfCameraModel);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!setLensfunLens(pp->lensProf.lfLens) && !pp->lensProf.lfManual()) {
|
if (pp->lensProf.lfAutoMatch()) {
|
||||||
if (metadata) {
|
if (metadata) {
|
||||||
const LFLens l = db->findLens(c, metadata->getLens());
|
const LFLens l = db->findLens(c, metadata->getLens());
|
||||||
setLensfunLens(l.getLens());
|
setLensfunLens(l.getLens());
|
||||||
}
|
}
|
||||||
|
} else if (pp->lensProf.lfManual()) {
|
||||||
|
setLensfunLens(pp->lensProf.lfLens);
|
||||||
}
|
}
|
||||||
|
|
||||||
lcModeChanged = lcpFileChanged = useDistChanged = useVignChanged = useCAChanged = false;
|
lcModeChanged = lcpFileChanged = useDistChanged = useVignChanged = useCAChanged = false;
|
||||||
useLensfunChanged = lensfunAutoChanged = lensfunCameraChanged = lensfunLensChanged = false;
|
useLensfunChanged = lensfunAutoChanged = lensfunCameraChanged = lensfunLensChanged = false;
|
||||||
|
|
||||||
if (!batchMode && !checkLensfunCanCorrect(true)) {
|
/*
|
||||||
|
if (!batchMode && !checkLensfunCanCorrect(true)) {
|
||||||
if (corrLensfunAutoRB->get_active()) {
|
if (corrLensfunAutoRB->get_active()) {
|
||||||
corrOffRB->set_active(true);
|
corrOffRB->set_active(true);
|
||||||
}
|
}
|
||||||
@ -252,9 +264,10 @@ void LensProfilePanel::read(const rtengine::procparams::ProcParams* pp, const Pa
|
|||||||
corrLensfunAutoRB->set_sensitive(false);
|
corrLensfunAutoRB->set_sensitive(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (corrLensfunManualRB->get_active() && !checkLensfunCanCorrect(false)) {
|
if (!batchMode && corrLensfunManualRB->get_active() && !checkLensfunCanCorrect(true)) {
|
||||||
corrOffRB->set_active(true);
|
corrOffRB->set_active(true);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
updateLensfunWarning();
|
updateLensfunWarning();
|
||||||
|
|
||||||
@ -293,7 +306,7 @@ void LensProfilePanel::write(rtengine::procparams::ProcParams* pp, ParamsEdited*
|
|||||||
|
|
||||||
const auto itc = lensfunCameras->get_active();
|
const auto itc = lensfunCameras->get_active();
|
||||||
|
|
||||||
if (itc) {
|
if (itc && !corrLensfunAutoRB->get_active()) {
|
||||||
pp->lensProf.lfCameraMake = (*itc)[lf->lensfunModelCam.make];
|
pp->lensProf.lfCameraMake = (*itc)[lf->lensfunModelCam.make];
|
||||||
pp->lensProf.lfCameraModel = (*itc)[lf->lensfunModelCam.model];
|
pp->lensProf.lfCameraModel = (*itc)[lf->lensfunModelCam.model];
|
||||||
} else {
|
} else {
|
||||||
@ -303,7 +316,7 @@ void LensProfilePanel::write(rtengine::procparams::ProcParams* pp, ParamsEdited*
|
|||||||
|
|
||||||
const auto itl = lensfunLenses->get_active();
|
const auto itl = lensfunLenses->get_active();
|
||||||
|
|
||||||
if (itl) {
|
if (itl && !corrLensfunAutoRB->get_active()) {
|
||||||
pp->lensProf.lfLens = (*itl)[lf->lensfunModelLens.lens];
|
pp->lensProf.lfLens = (*itl)[lf->lensfunModelLens.lens];
|
||||||
} else {
|
} else {
|
||||||
pp->lensProf.lfLens = "";
|
pp->lensProf.lfLens = "";
|
||||||
@ -386,13 +399,13 @@ void LensProfilePanel::onUseCAChanged()
|
|||||||
|
|
||||||
void LensProfilePanel::setBatchMode(bool yes)
|
void LensProfilePanel::setBatchMode(bool yes)
|
||||||
{
|
{
|
||||||
FoldableToolPanel::setBatchMode(yes);
|
|
||||||
|
|
||||||
if (yes) {
|
FoldableToolPanel::setBatchMode(yes);
|
||||||
corrUnchangedRB->set_group(corrGroup);
|
|
||||||
modesGrid->attach_next_to(*corrUnchangedRB, Gtk::POS_TOP, 3, 1);
|
corrUnchangedRB->set_group(corrGroup);
|
||||||
corrUnchangedRB->set_active(true);
|
modesGrid->attach_next_to(*corrUnchangedRB, Gtk::POS_TOP, 3, 1);
|
||||||
}
|
corrUnchangedRB->signal_toggled().connect(sigc::bind(sigc::mem_fun(*this, &LensProfilePanel::onCorrModeChanged), corrUnchangedRB));
|
||||||
|
corrUnchangedRB->set_active(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LensProfilePanel::onLensfunCameraChanged()
|
void LensProfilePanel::onLensfunCameraChanged()
|
||||||
@ -454,15 +467,21 @@ void LensProfilePanel::onCorrModeChanged(const Gtk::RadioButton* rbChanged)
|
|||||||
} else if (rbChanged == corrLensfunAutoRB) {
|
} else if (rbChanged == corrLensfunAutoRB) {
|
||||||
useLensfunChanged = true;
|
useLensfunChanged = true;
|
||||||
lensfunAutoChanged = true;
|
lensfunAutoChanged = true;
|
||||||
|
lensfunCameraChanged = true;
|
||||||
|
lensfunLensChanged = true;
|
||||||
lcpFileChanged = true;
|
lcpFileChanged = true;
|
||||||
useDistChanged = true;
|
useDistChanged = true;
|
||||||
useVignChanged = true;
|
useVignChanged = true;
|
||||||
|
|
||||||
ckbUseDist->set_sensitive(true);
|
ckbUseDist->set_sensitive(true);
|
||||||
ckbUseVign->set_sensitive(true);
|
ckbUseVign->set_sensitive(true);
|
||||||
ckbUseCA->set_sensitive(false);
|
ckbUseCA->set_sensitive(true);
|
||||||
|
|
||||||
if (metadata) {
|
|
||||||
|
if (batchMode) {
|
||||||
|
setLensfunCamera("", "");
|
||||||
|
setLensfunLens("");
|
||||||
|
} else if (metadata) {
|
||||||
const bool disabled = disableListener();
|
const bool disabled = disableListener();
|
||||||
const LFDatabase* const db = LFDatabase::getInstance();
|
const LFDatabase* const db = LFDatabase::getInstance();
|
||||||
const LFCamera c = db->findCamera(metadata->getMake(), metadata->getModel());
|
const LFCamera c = db->findCamera(metadata->getMake(), metadata->getModel());
|
||||||
@ -479,6 +498,8 @@ void LensProfilePanel::onCorrModeChanged(const Gtk::RadioButton* rbChanged)
|
|||||||
} else if (rbChanged == corrLensfunManualRB) {
|
} else if (rbChanged == corrLensfunManualRB) {
|
||||||
useLensfunChanged = true;
|
useLensfunChanged = true;
|
||||||
lensfunAutoChanged = true;
|
lensfunAutoChanged = true;
|
||||||
|
lensfunCameraChanged = true;
|
||||||
|
lensfunLensChanged = true;
|
||||||
lcpFileChanged = true;
|
lcpFileChanged = true;
|
||||||
useDistChanged = true;
|
useDistChanged = true;
|
||||||
useVignChanged = true;
|
useVignChanged = true;
|
||||||
@ -515,7 +536,7 @@ void LensProfilePanel::onCorrModeChanged(const Gtk::RadioButton* rbChanged)
|
|||||||
lcModeChanged = true;
|
lcModeChanged = true;
|
||||||
updateLensfunWarning();
|
updateLensfunWarning();
|
||||||
|
|
||||||
if (rbChanged == corrLensfunManualRB || rbChanged == corrLensfunAutoRB) {
|
if (rbChanged == corrLensfunManualRB || (!batchMode && rbChanged == corrLensfunAutoRB)) {
|
||||||
setManualParamsVisibility(true);
|
setManualParamsVisibility(true);
|
||||||
} else {
|
} else {
|
||||||
setManualParamsVisibility(false);
|
setManualParamsVisibility(false);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user