mirror of
https://github.com/1j01/textual-paint.git
synced 2025-01-03 04:16:48 +03:00
Select pencil when trying to draw with unimplemented tool
This commit is contained in:
parent
470e6e119e
commit
4c2fc00e45
3
paint.py
3
paint.py
@ -334,6 +334,9 @@ class PaintApp(App):
|
||||
|
||||
def on_canvas_tool_start(self, event: Canvas.ToolStart) -> None:
|
||||
"""Called when the user starts drawing on the canvas."""
|
||||
if self.selected_tool != Tool.pencil and self.selected_tool != Tool.brush:
|
||||
self.selected_tool = Tool.pencil
|
||||
# TODO: support other tools
|
||||
self.stamp_brush(event.mouse_down_event.x, event.mouse_down_event.y)
|
||||
self.canvas.refresh()
|
||||
event.stop()
|
||||
|
Loading…
Reference in New Issue
Block a user