Convert almost all IdleRegister::add() calls to add(std::function<>)

This commit is contained in:
Flössie
2019-01-01 15:53:39 +01:00
parent 5af3f64a9d
commit b08fb04dae
22 changed files with 574 additions and 610 deletions

View File

@@ -672,28 +672,20 @@ void Retinex::minmaxChanged (double cdma, double cdmin, double mini, double maxi
nextminT = Tmin;
nextmaxT = Tmax;
const auto func =
[](Retinex* self) -> bool
idle_register.add(
[this]() -> bool
{
GThreadLock lock; // All GUI access from idle_add callbacks or separate thread HAVE to be protected
// FIXME: The above can't be true?!
self->minmaxComputed_();
disableListener();
enableListener();
updateLabel();
updateTrans();
return false;
};
idle_register.add<Retinex>(func, this, false);
}
);
}
bool Retinex::minmaxComputed_ ()
{
disableListener ();
enableListener ();
updateLabel ();
updateTrans ();
return false;
}
void Retinex::updateLabel ()
{
if (!batchMode) {