From: Martin Renold Date: Fri, 18 Nov 2011 23:27:13 +0000 (+0100) Subject: always allow to cancel eraser mode X-Git-Url: http://git.osdn.net/view?p=mypaint-anime%2Fmaster.git;a=commitdiff_plain;h=1fe137ca908448c948c359dc3ac7b00988cbb78e always allow to cancel eraser mode Fix for https://gna.org/bugs/index.php?18616 And a similar problem fixed by this commit: in trunk - draw some, press 'e' to go into eraser mode, then flip pen over and erase some, then flip pen back over, it will flip back into the 'e' eraser. Press 'e' again to toggle out of eraser mode and note you can't get out of eraser mode --- diff --git a/gui/brushmodifier.py b/gui/brushmodifier.py index ee5ce11..7eba8e5 100644 --- a/gui/brushmodifier.py +++ b/gui/brushmodifier.py @@ -105,10 +105,9 @@ class BrushModifier: If `override` is true, the named setting will be forced to a base value greater than 0.9, and if it is false a base value less than 0.1 will be applied. Where possible, values from the base brush will be used. The - setting from `unmodified_brushinfo`, including any nonlinear - components, will be used if its base value is suitably large (or - small). If not, a base value of either 1 or 0 and no nonlinear - components will be applied. + setting from `unmodified_brushinfo`, including any input mapping, will + be used if its base value is suitably large (or small). If not, a base + value of either 1 or 0 and no input mapping will be applied. """ unmod_b = self.unmodified_brushinfo modif_b = self.app.brush @@ -184,12 +183,6 @@ class BrushModifier: self._set_radius_internal(r + dr) self._push_hist(action) else: - if self._brush_is_dedicated_eraser(): - # No, you may not leave eraser mode with one of these. - action.block_activate() - action.set_active(True) - action.unblock_activate() - return if not self._in_brush_selected_cb: # We're leaving eraser mode because the user deactivated the # ToggleAction, not because the brush changed. Might have to