Ciecam - Change management viewing temperature and tint #7055 (#7058)

* Change management viewing temperature and tint

* Enable autotemp wbcamchanged and hide history message

* Change wbcamchnaged as proposed by kaesa
This commit is contained in:
Desmis 2024-05-01 07:49:14 +02:00 committed by GitHub
parent 95f85d50f5
commit a53ddf4282
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 26 additions and 8 deletions

View File

@ -2308,8 +2308,8 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
tempsym = params->colorappearance.tempout;
greensym = params->colorappearance.greenout;
}
if (params->colorappearance.enabled) {
acListener->wbCamChanged(tempsym, greensym); //real temp and tint.
if (params->colorappearance.enabled && acListener) {
acListener->wbCamChanged(tempsym, greensym, params->colorappearance.autotempout); //real temp and tint.
}
} else {

View File

@ -372,7 +372,7 @@ public :
virtual void autoCamChanged(double ccam, double ccamout) = 0;
virtual void adapCamChanged(double cadap) = 0;
virtual void ybCamChanged(int yb) = 0;
virtual void wbCamChanged(double tem, double tin) = 0;
virtual void wbCamChanged(double tem, double tin, bool autotemp) = 0;
};

View File

@ -1880,18 +1880,36 @@ void ColorAppearance::adapCamChanged (double cadap)
}
void ColorAppearance::wbCamChanged (double temp, double tin)
void ColorAppearance::wbCamChanged (double temp, double tin, bool autotemp)
{//reactivate this function
idle_register.add(
[this, temp, tin]() -> bool
[this, temp, tin, autotemp]() -> bool
{
if (temp != tempout->getValue()) {
disableListener();
tempout->setValue(temp);
enableListener();
listener->panelChanged (EvCATtempout, tempout->getTextValue());
}
if (tin != greenout->getValue()) {
disableListener();
greenout->setValue(tin);
enableListener();
listener->panelChanged (EvCATgreenout, greenout->getTextValue());
}
/*
disableListener();
tempout->setValue(temp);
greenout->setValue(tin);
enableListener();
listener->panelChanged (EvCATgreenout, greenout->getTextValue());
listener->panelChanged (EvCATtempout, tempout->getTextValue());
if(!autotemp) {
listener->panelChanged (EvCATgreenout, "");//greenout->getTextValue());
listener->panelChanged (EvCATtempout, "");//tempout->getTextValue());
}*/
return false;
}
);

View File

@ -66,7 +66,7 @@ public:
void autoCamChanged (double ccam, double ccamout) override;
bool autoCamComputed_ ();
void adapCamChanged (double cadap) override;
void wbCamChanged(double tem, double tin) override;
void wbCamChanged(double tem, double tin, bool autotemp) override;
bool adapCamComputed_ ();
void ybCamChanged (int yb) override;
bool ybCamComputed_ ();