GNOME Bugzilla – Bug 794854
Brush color is not added to color history in smudge tool
Last modified: 2018-04-05 00:12:03 UTC
Created attachment 370366 [details] a patch try to fix this Relative article: https://bugzilla.gnome.org/show_bug.cgi?id=785001 Previously posted there, but I was suggested to open a new bug. I added painting ability to smudge tool but forgot one thing available in other paint tools : When painting the foreground color was not added to color history. My study: In other tools there are two ways to achieve this. Airbrush and Pencil inherit GimpPaintbrush class, and Ink and MyPaint Brush check the conditions and call gimp_palettes_add_color_history() by themself. In smudge tool I chose the latter way because GimpPaintbrush and GimpSmudge seemed to share few common features. For example, airbrush uses _gimp_paintbrush_motion() for painting, but smudge tool can't use this function because smudge tool has different algorithm from this function.
Quick look: that looks good. I'll make a quick test tomorrow to double check and most likely push.
commit e55c94eff0a9b2715b052b61fdc95bb071882c8c Author: shark0r <b91502038@ntu.edu.tw> Date: Fri Mar 30 01:53:12 2018 +0800 Bug 794854 - Brush color is not added to color history in smudge tool Add the color in gimp_smudge_paint(INIT) like GimpPaintbrush does. Achieve this by calling gimp_palettes_add_color_history() directly, not by inheriting GimpPaintbrush because GimpPaintbrush and GimpSmudge seem to share few common features. app/paint/gimpsmudge.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+)
*** Bug 794962 has been marked as a duplicate of this bug. ***