X-Git-Url: https://cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fplugins%2Fbrightness%2Fbrightness.C;h=5de95b65ae42e9cc47c9c62a456c418a3aa184bb;hb=1a2c313b568030b465b165089f0b90730d17884d;hp=19bcae30242659944d37b005a72a39d50f4bf882;hpb=7fd85fb66168f6b518c5f2d73e04036e87faa0e1;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/plugins/brightness/brightness.C b/cinelerra-5.1/plugins/brightness/brightness.C index 19bcae30..5de95b65 100644 --- a/cinelerra-5.1/plugins/brightness/brightness.C +++ b/cinelerra-5.1/plugins/brightness/brightness.C @@ -35,12 +35,25 @@ REGISTER_PLUGIN(BrightnessMain) - BrightnessConfig::BrightnessConfig() { - brightness = 0; - contrast = 0; - luma = 1; + reset(0); +} + +void BrightnessConfig::reset(int clear) +{ + switch(clear) { + case RESET_CONTRAST : contrast = 0; + break; + case RESET_BRIGHTNESS : brightness = 0; + break; + case RESET_ALL : + default: + brightness = 0; + contrast = 0; + luma = 1; + break; + } } int BrightnessConfig::equivalent(BrightnessConfig &that) @@ -242,8 +255,10 @@ void BrightnessMain::update_gui() if(load_configuration()) { ((BrightnessWindow*)thread->window)->lock_window("BrightnessMain::update_gui"); - ((BrightnessWindow*)thread->window)->brightness->update(config.brightness); - ((BrightnessWindow*)thread->window)->contrast->update(config.contrast); + ((BrightnessWindow*)thread->window)->brightness_text->update(config.brightness); + ((BrightnessWindow*)thread->window)->brightness_slider->update(config.brightness); + ((BrightnessWindow*)thread->window)->contrast_text->update(config.contrast); + ((BrightnessWindow*)thread->window)->contrast_slider->update(config.contrast); ((BrightnessWindow*)thread->window)->luma->update(config.luma); ((BrightnessWindow*)thread->window)->unlock_window(); }