blendif color picker stays active after blending is disabled
Steps to reproduce:
1). enable blendif in any module
2). click on color picker icon from blendif controls
3). disable blending (or just blendif, or collapse module)
4). click anywhere in central area where image is
You will see that color picker is still active and the only way to disable it as far as I can tell is to reenable blendif and click again on color picker icon. IMHO color picker should be automatically disabled when blendif controls get hidden.
#1 Updated by Igor Kuzmin over 7 years ago
Hmm, actually collapsing/defocussing module does disable color picker, so that part isn't correct, but disabling blendif doesn't, so the bug is still valid.
Also, color picker pointer doesn't always get hidden after you focus another module, you have to click somewhere.
#2 Updated by Ulrich Pegelow over 7 years ago
- % Done changed from 0 to 10
- Status changed from New to Confirmed
I can confirm your observation. In fact it's a known issue and not easy to solve.
We in fact have one color picker available per module/instance. It is activated by setting flag module->request_color_pick directly in a module iop.
The easy part is when only blendif can request a color picker -> if blendif is switched off, color picker could be deactivated by setting the flag to zero.
However, there are modules which can request color picker by themselves (tonecurve, levels, fill light, ...). As color picker has no notion by which part it
was activated, it would not be wise to switch it off when blendif is deactivated.
Any ideas how to solve this?
#3 Updated by Igor Kuzmin over 7 years ago
OK, so some modules have 2 color picker buttons... This is quite broken... If I enable one of them, actually both are working. And if I enable both and then disable one of them, color picker gets disabled while one of the buttons remains highlighted.Blendif code is independent and doesn't know anything about color picker in module itself, that's the source of problems, right?
I can suggest instead of doing
module->request_color_pick = enable ? 1 : 0;
do smth like that:
And of course do decrement when blendif controls gets hidden with activated color picker button.
#4 Updated by Ulrich Pegelow over 7 years ago
Re your suggestion: certainly would be an option. Only problem is if user happens to hit both buttons. Then he needs to know that both require de-activation.
Also if the module is switched off, the color picker - if requested by blendif - might still be on. Or we need to take care of this special case somewhere else.
I'm not sure if this really improves the situation. After all the color picker does not do much harm.
#5 Updated by Igor Kuzmin over 7 years ago
I'm not sure how color picker should behave when module is disabled... I don't think it's a big issue.
Anyway, if you don't want to deal with the whole mess of 2 picker buttons right now, at least we should fix the issue described in topic post - disable color picker when blendif is hidden. I disagree that picker doesn't harm - it prevents user from panning around by dragging the image.
#9 Updated by Igor Kuzmin over 7 years ago
One minor problem remains in case of 2 color pickers in 1 module:
1). enable blendif color picker
2). enable module's own color picker (blendif color picker button remains in "on" state and module's color picker is on too now)
3). disable module's own color picker
In result you will have disabled color picker, but blendif color picker button still in "on" state.
Hmm, actually this only reproducible if blendif sliders aren't visible currently (when row with tabs and buttons is at the bottom of panel, just above "more modules").