diff --git a/buttons.c b/buttons.c index a06bb8a1..e21f464a 100644 --- a/buttons.c +++ b/buttons.c @@ -2073,7 +2073,7 @@ void Button_Gradients(void) default: if (Is_shortcut(Key,0x100+BUTTON_HELP)) { - Window_help(BUTTON_GRADMENU, NULL); + Window_help(BUTTON_GRADRECT, NULL); Key=0; break; } @@ -2082,7 +2082,10 @@ void Button_Gradients(void) while (clicked_button<6); Close_window(); - Unselect_button(BUTTON_GRADMENU); + // The Grad rect operation uses the same button as Grad menu. + if (Current_operation != OPERATION_GRAD_RECTANGLE) + Unselect_button(BUTTON_GRADRECT); + Display_cursor(); Gradient_pixel=Display_pixel; @@ -3804,12 +3807,7 @@ void Effects_off(void) Stencil_mode=0; Mask_mode=0; Sieve_mode=0; - Snap_mode=0; - - if (! Windows_open) - { - - } + Snap_mode=0; } void Transparency_set(byte amount) diff --git a/const.h b/const.h index 64c7dc6b..052efa6b 100644 --- a/const.h +++ b/const.h @@ -271,7 +271,6 @@ enum BUTTON_NUMBERS BUTTON_CIRCLES, BUTTON_FILLCIRC, BUTTON_GRADRECT, - BUTTON_GRADMENU, BUTTON_SPHERES, BUTTON_BRUSH, BUTTON_POLYBRUSH, diff --git a/engine.c b/engine.c index 70e31fa3..80262a69 100644 --- a/engine.c +++ b/engine.c @@ -75,8 +75,7 @@ char * Menu_tooltip[NB_BUTTONS]= "Filled rectangles ", "Empty circles / ellipses", "Filled circles / ellips.", - "Grad. rectangles ", - "Gradation menu ", + "Grad. rect / Grad. menu ", "Grad. spheres / ellipses", "Brush grab. / Restore ", "Lasso / Restore brush ", @@ -372,6 +371,9 @@ void Select_button(int btn_number,byte click) // the unselection of all "Tool" buttons. if (btn_number==BUTTON_ADJUST && click==RIGHT_SIDE) break; + // Same case with the Grad. Rectangle button. + if (btn_number==BUTTON_GRADRECT && click==RIGHT_SIDE) + break; // Pour chaque bouton: for (b=0; b