After Ctrl+click pipette, color selector showed old color

Was redrawing color toolbar _before_ changing the chosen color
to be the pipette tool.

Reproducing the bug - Select a built-in color, Ctrl+click in the canvas,
observe built-in color still appears chosen [the bug], paint with e.g.,
paint brush, observe it's using the correct, pipette-selected color,
not the one that appears chosen [this is correct].
This commit is contained in:
Bill Kendrick 2023-05-03 10:11:56 -07:00
parent 173ab9203a
commit de7b8dd51b
2 changed files with 7 additions and 2 deletions

View file

@ -133,6 +133,10 @@ https://tuxpaint.org/
* Don't try to load a blank-named template during slideshow playback.
Bill Kendrick <bill@newbreedsoftware.com>
* Color palette would still show previously-selected color as active
when returning from the temporary color pipette ([Ctrl] + click).
Bill Kendrick <bill@newbreedsoftware.com>
* Ports & Building:
-----------------
* Created "src/indent.sh", to run 'indent' against source files.

View file

@ -22,7 +22,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(See COPYING.txt)
June 14, 2002 - May 1, 2023
June 14, 2002 - May 3, 2023
*/
#include "platform.h"
@ -5203,7 +5203,6 @@ static void mainloop(void)
chose_color = do_color_sel(1);
draw_cur_tool_tip();
draw_colors(COLORSEL_FORCE_REDRAW);
if (chose_color)
{
@ -5214,6 +5213,8 @@ static void mainloop(void)
else
playsound(screen, 1, SND_CLICK, 1, SNDPOS_CENTER, SNDDIST_NEAR);
draw_colors(COLORSEL_FORCE_REDRAW);
SDL_Flip(screen);
}
else if (kbd_state[SDL_SCANCODE_X])