After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 775134 - mypaint-brush: Saved color in a brush isn't taken into account
mypaint-brush: Saved color in a brush isn't taken into account
Product: GIMP
Classification: Other
Component: Tools
git master
Other All
: Normal normal
: 2.10
Assigned To: GIMP Bugs
Depends on:
Reported: 2016-11-26 13:34 UTC by Roumeissa Kitouni
Modified: 2016-12-11 18:42 UTC
See Also:
GNOME target: ---
GNOME version: ---

difference between a regular pencil and a red pencil (1.29 KB, text/plain)
2016-11-26 13:34 UTC, Roumeissa Kitouni

Description Roumeissa Kitouni 2016-11-26 13:34:33 UTC
Created attachment 340797 [details]
difference between a regular pencil and a red pencil

It is possible in mypaint to save the current color in a brush so it switches to it automatically when the brush is selected, using the Save Color setting. The setting can have a value between 0 and 1 (where 0 keeps the previous color, 1 restores the brush's saved color, and any value between the two applies a hue of the saved color to the previous color depending on the value.)

As the title says, in gimp, the color doesn't change with the mypaint brush regardless of that setting. 
I took a regular pencil brush from one of the default packs and modified it so it becomes a red pencil. I attached the result of the diff -u command between the two. 

Please let me know if there is anything else I should provide.
Comment 1 Andrew Chadwick 2016-11-29 12:21:13 UTC
Here's the code that MyPaint uses for this setting, but this has to be implemented in GIMP if it isn't already.

It isn't necessarily the right way, or even especially nice code, sadly :(
Comment 2 Jehan 2016-11-29 23:29:17 UTC
Thanks. We'll have a look!
Comment 3 Jehan 2016-11-29 23:30:03 UTC
Adding 2.10 milestone. Because that would be good if that could be fixed by then (though that's not blocker level IMO).
Comment 4 Michael Natterer 2016-12-11 18:42:23 UTC
This should fix it, but I didn't test. If you have such brushes,
please check if it works and reopen if it doesn't.

commit 350c6ca1f7a4c53f5a51933eae2c9bb7c9c0e649
Author: Michael Natterer <>
Date:   Sun Dec 11 19:39:33 2016 +0100

    Bug 775134 - mypaint-brush: Saved color in a brush isn't taken into account
    gimp_mybrush_core_create_brushes(): don't set the current FG or BG on
    the brush if its RESTORE_COLOR setting is 1.0 (TRUE).

 app/paint/gimpmybrushcore.c | 22 +++++++++++++---------
 1 file changed, 13 insertions(+), 9 deletions(-)