Bug 318007

Summary: JJ: Fill background and foreground ignores alpha lock layer state.
Product: [Applications] krita Reporter: vanyossi <ghevan>
Component: UsabilityAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: christer.stenbrenden, halla, sven.langkamp
Priority: NOR Keywords: junior-jobs
Version: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description vanyossi 2013-04-08 04:40:55 UTC
After locking alpha channel on a layer attempting to fill using menu "edit > Fill" or keyboard shortcuts, fill the entire layer intead of just the opaque areas

Reproducible: Always

Steps to Reproduce:
1.Paint something on a new layer. I painted 2 filled circles
2.Lock the new layer alpha channel
3. Go to "Edit > Fill with background (or foreground) color" Or press keyboard shortcut to fill layer with fg or bg color.
Actual Results:  
The entire layer fills with the color selected ignoring alpha channel

Expected Results:  
only painted areas should be filled with color.
The behavior im expecting can be achieved using the paint bucket tool and checking the "Fill entire selection" checkbox in the tool options.

I think this is extremely important for new adopters as this is common to do on some workflows.
Comment 1 Halla Rempt 2013-05-18 08:22:18 UTC
Ack,  I can confirm. Currently, fill background and fill foreground are very simple and just blit the color all over the layer (see KisSelectionActionFactories, void KisFillActionFactory::run(const QString &fillSource, KisView2 *view)).

This should be changed to call the same code as the fill tool, I think. It's not hard, could even be a junior job.
Comment 2 Christer Stenbrenden 2013-09-05 09:42:44 UTC
The fill tool uses code that's only residing inside the plugin, as far as I can tell, but the code behind "Fill with foreground color" etc. resides under ui/actions. I want to use the same Visitor implementation as the Fill Tool, but where should I put this common code? :-)