Merge pull request #3318 from Beep6581/lcpautofill
Automatically disable Auto-Fill when enabling LCP Disortion Correction, #1791
This commit is contained in:
@@ -43,6 +43,11 @@ LensGeometry::LensGeometry () : FoldableToolPanel(this, "lensgeom", M("TP_LENSGE
|
|||||||
show_all ();
|
show_all ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LensGeometry::~LensGeometry ()
|
||||||
|
{
|
||||||
|
g_idle_remove_by_data(this);
|
||||||
|
}
|
||||||
|
|
||||||
void LensGeometry::read (const ProcParams* pp, const ParamsEdited* pedited)
|
void LensGeometry::read (const ProcParams* pp, const ParamsEdited* pedited)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -113,3 +118,26 @@ void LensGeometry::setBatchMode (bool batchMode)
|
|||||||
ToolPanel::setBatchMode (batchMode);
|
ToolPanel::setBatchMode (batchMode);
|
||||||
removeIfThere (this, autoCrop);
|
removeIfThere (this, autoCrop);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LensGeometry::disableAutoFillIfActive ()
|
||||||
|
{
|
||||||
|
g_idle_add(doDisableAutoFillIfActive, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
int LensGeometry::doDisableAutoFillIfActive (void* data)
|
||||||
|
{
|
||||||
|
GThreadLock lock; // Is this really needed?
|
||||||
|
|
||||||
|
LensGeometry* const instance = static_cast<LensGeometry*>(data);
|
||||||
|
|
||||||
|
if (!instance->batchMode) {
|
||||||
|
if (instance->fill->get_active()) {
|
||||||
|
instance->fillConn.block (true);
|
||||||
|
instance->fill->set_active(false);
|
||||||
|
if (instance->listener) {
|
||||||
|
instance->listener->panelChanged (EvTransAutoFill, M("GENERAL_DISABLED"));
|
||||||
|
}
|
||||||
|
instance->fillConn.block (false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -32,11 +32,12 @@ protected:
|
|||||||
Gtk::CheckButton* fill;
|
Gtk::CheckButton* fill;
|
||||||
bool lastFill;
|
bool lastFill;
|
||||||
sigc::connection fillConn;
|
sigc::connection fillConn;
|
||||||
ToolParamBlock* packBox;
|
ToolParamBlock* packBox;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
LensGeometry ();
|
LensGeometry ();
|
||||||
|
~LensGeometry ();
|
||||||
|
|
||||||
Gtk::Box* getPackBox ()
|
Gtk::Box* getPackBox ()
|
||||||
{
|
{
|
||||||
@@ -53,6 +54,11 @@ public:
|
|||||||
{
|
{
|
||||||
rlistener = l;
|
rlistener = l;
|
||||||
}
|
}
|
||||||
|
void disableAutoFillIfActive ();
|
||||||
|
|
||||||
|
private:
|
||||||
|
static int doDisableAutoFillIfActive (void* data);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -142,6 +142,10 @@ void LensProfilePanel::write( rtengine::procparams::ProcParams* pp, ParamsEdited
|
|||||||
|
|
||||||
void LensProfilePanel::onLCPFileChanged()
|
void LensProfilePanel::onLCPFileChanged()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// Disable Auto-Fill when enabling LCP Distortion Correction, #1791
|
||||||
|
lensgeomLcpFill->disableAutoFillIfActive();
|
||||||
|
|
||||||
lcpFileChanged = true;
|
lcpFileChanged = true;
|
||||||
updateDisabled(lcpStore->isValidLCPFileName(fcbLCPFile->get_filename()));
|
updateDisabled(lcpStore->isValidLCPFileName(fcbLCPFile->get_filename()));
|
||||||
|
|
||||||
@@ -164,6 +168,12 @@ void LensProfilePanel::onLCPFileReset()
|
|||||||
|
|
||||||
void LensProfilePanel::onUseDistChanged()
|
void LensProfilePanel::onUseDistChanged()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// Disable Auto-Fill when enabling LCP Distortion Correction, #1791
|
||||||
|
if (ckbUseDist->get_active()) {
|
||||||
|
lensgeomLcpFill->disableAutoFillIfActive();
|
||||||
|
}
|
||||||
|
|
||||||
useDistChanged = true;
|
useDistChanged = true;
|
||||||
|
|
||||||
if (listener) {
|
if (listener) {
|
||||||
|
@@ -22,6 +22,7 @@
|
|||||||
#include <gtkmm.h>
|
#include <gtkmm.h>
|
||||||
#include "toolpanel.h"
|
#include "toolpanel.h"
|
||||||
#include "guiutils.h"
|
#include "guiutils.h"
|
||||||
|
#include "lensgeom.h"
|
||||||
|
|
||||||
class LensProfilePanel : public ToolParamBlock, public FoldableToolPanel
|
class LensProfilePanel : public ToolParamBlock, public FoldableToolPanel
|
||||||
{
|
{
|
||||||
@@ -38,6 +39,7 @@ protected:
|
|||||||
void updateDisabled(bool enable);
|
void updateDisabled(bool enable);
|
||||||
bool allowFocusDep;
|
bool allowFocusDep;
|
||||||
bool isRaw;
|
bool isRaw;
|
||||||
|
LensGeometry *lensgeomLcpFill;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@@ -52,6 +54,7 @@ public:
|
|||||||
void onUseDistChanged();
|
void onUseDistChanged();
|
||||||
void onUseVignChanged();
|
void onUseVignChanged();
|
||||||
void onUseCAChanged();
|
void onUseCAChanged();
|
||||||
|
void setLensGeomRef( LensGeometry *foo) { lensgeomLcpFill = foo ;};
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -1807,6 +1807,7 @@ void MyFlatCurve::setPoints (const std::vector<double>& p)
|
|||||||
stopNumericalAdjustment();
|
stopNumericalAdjustment();
|
||||||
FlatCurveType t = (FlatCurveType)p[ix++];
|
FlatCurveType t = (FlatCurveType)p[ix++];
|
||||||
curve.type = t;
|
curve.type = t;
|
||||||
|
lit_point = -1;
|
||||||
|
|
||||||
if (t == FCT_MinMaxCPoints) {
|
if (t == FCT_MinMaxCPoints) {
|
||||||
curve.x.clear ();
|
curve.x.clear ();
|
||||||
|
@@ -53,6 +53,7 @@ ToolPanelCoordinator::ToolPanelCoordinator () : ipc(nullptr), editDataProvider(n
|
|||||||
colortoning = Gtk::manage (new ColorToning ());
|
colortoning = Gtk::manage (new ColorToning ());
|
||||||
lensgeom = Gtk::manage (new LensGeometry ());
|
lensgeom = Gtk::manage (new LensGeometry ());
|
||||||
lensProf = Gtk::manage (new LensProfilePanel ());
|
lensProf = Gtk::manage (new LensProfilePanel ());
|
||||||
|
lensProf->setLensGeomRef(lensgeom);
|
||||||
distortion = Gtk::manage (new Distortion ());
|
distortion = Gtk::manage (new Distortion ());
|
||||||
rotate = Gtk::manage (new Rotate ());
|
rotate = Gtk::manage (new Rotate ());
|
||||||
vibrance = Gtk::manage (new Vibrance ());
|
vibrance = Gtk::manage (new Vibrance ());
|
||||||
|
Reference in New Issue
Block a user