Replace all add_idle()s with IdleRegister

This commit is contained in:
Flössie
2017-02-10 21:22:42 +01:00
parent 824ecaed41
commit 79ff7f5997
21 changed files with 691 additions and 637 deletions

View File

@@ -364,23 +364,25 @@ BlackWhite::BlackWhite (): FoldableToolPanel(this, "blackwhite", M("TP_BWMIX_LAB
}
BlackWhite::~BlackWhite ()
{
idle_register.destroy();
delete luminanceCEG;
delete beforeCurveCEG;
delete afterCurveCEG;
}
int BWChangedUI (void* data)
{
(static_cast<BlackWhite*>(data))->BWComputed_ ();
return 0;
}
void BlackWhite::BWChanged (double redbw, double greenbw, double bluebw)
{
nextredbw = redbw;
nextgreenbw = greenbw;
nextbluebw = bluebw;
add_idle (BWChangedUI, this);
const auto func = [](gpointer data) -> gboolean {
static_cast<BlackWhite*>(data)->BWComputed_();
return FALSE;
};
idle_register.add(func, this);
}
bool BlackWhite::BWComputed_ ()