X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fplugins%2Fbrightness%2Fbrightness.C;h=5de95b65ae42e9cc47c9c62a456c418a3aa184bb;hb=e21da84b50724b40b38b5e0373d1a25e587169ee;hp=ccfcd90445ec35be975df56be2ca487fe068eaf1;hpb=1c6e05239a27d92813c27c697ccac25378b9efa0;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/plugins/brightness/brightness.C b/cinelerra-5.1/plugins/brightness/brightness.C index ccfcd904..5de95b65 100644 --- a/cinelerra-5.1/plugins/brightness/brightness.C +++ b/cinelerra-5.1/plugins/brightness/brightness.C @@ -37,15 +37,23 @@ REGISTER_PLUGIN(BrightnessMain) BrightnessConfig::BrightnessConfig() { - reset(); + reset(0); } -void BrightnessConfig::reset() - +void BrightnessConfig::reset(int clear) { - brightness = 0; - contrast = 0; - luma = 1; + 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) @@ -247,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(); }