From c40a2ad47023ece414ec302ca9f64264697ad7f8 Mon Sep 17 00:00:00 2001 From: Jordan Christiansen Date: Tue, 30 Oct 2018 18:10:36 -0500 Subject: [PATCH] Prevent "Restore lasso brush" from clearing the brush Fixes Trac bug #16 --- src/buttons.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/buttons.c b/src/buttons.c index 62794596..18d84ef5 100644 --- a/src/buttons.c +++ b/src/buttons.c @@ -3719,9 +3719,14 @@ void Button_Lasso(int btn) void Button_Unselect_lasso(int btn) { (void)btn; + + // If we aren't in OPERATION_POLYBRUSH, then we didn't save a brush shape, + // and we shouldn't try to restore it. + if (Current_operation==OPERATION_POLYBRUSH) + Paintbrush_shape=Paintbrush_shape_before_lasso; + // On fait de notre mieux pour restaurer l'ancienne opération: Start_operation_stack(Operation_before_interrupt); - Paintbrush_shape=Paintbrush_shape_before_lasso; }