mbrlabs / Lorien

Infinite canvas drawing/whiteboarding app for Windows, Linux and macOS. Made with Godot.
MIT License
5.45k stars 234 forks source link

Minor changes to remove checks for logically impossible situations #234

Closed TheRealMothebad closed 1 year ago

TheRealMothebad commented 1 year ago

Two changes:

  1. The tool_event InputEvent is either a MouseMotion or a MouseButton, so the check for the InputEvent being a MouseButton event does not need to occur if the object is already identified as a MouseMotion.
  2. In the tool_event MouseButton path, if the elif section is reached then event.pressed is guaranteed to be false, so checking that it is false is redundant.
mbrlabs commented 1 year ago

Thanks!