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)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -116,16 +121,23 @@ void LensGeometry::setBatchMode (bool batchMode)
|
|||||||
|
|
||||||
void LensGeometry::disableAutoFillIfActive ()
|
void LensGeometry::disableAutoFillIfActive ()
|
||||||
{
|
{
|
||||||
|
g_idle_add(doDisableAutoFillIfActive, this);
|
||||||
if (!batchMode) {
|
|
||||||
if (fill->get_active()) {
|
|
||||||
fillConn.block (true);
|
|
||||||
fill->set_active(false);
|
|
||||||
if (listener) {
|
|
||||||
listener->panelChanged (EvTransAutoFill, M("GENERAL_DISABLED"));
|
|
||||||
}
|
|
||||||
fillConn.block (false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -37,6 +37,7 @@ protected:
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
LensGeometry ();
|
LensGeometry ();
|
||||||
|
~LensGeometry ();
|
||||||
|
|
||||||
Gtk::Box* getPackBox ()
|
Gtk::Box* getPackBox ()
|
||||||
{
|
{
|
||||||
@@ -54,6 +55,10 @@ public:
|
|||||||
rlistener = l;
|
rlistener = l;
|
||||||
}
|
}
|
||||||
void disableAutoFillIfActive ();
|
void disableAutoFillIfActive ();
|
||||||
|
|
||||||
|
private:
|
||||||
|
static int doDisableAutoFillIfActive (void* data);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#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 ();
|
||||||
|
Reference in New Issue
Block a user