Take toolsize and erasertype from corresponding toolbar tool when triggered by Button
This is relevant in case the button configuration is set to Size `Don't Change` or Eraser Type `Don't Change`.
This change removes code that was erroneously implemented but leads to a
nullptr being referenced in case no ColorToolItem is present in the
toolbar and a buttontool is activated that has no color capability.
Fix Bug where Erasertyp was set/get by the currently selected tool.
However, it should always be set from the eraser in the toolbar, and get
from the eraser in the toolbar only if the active tool is not a eraser
already.
- refactor changeTool implementation to void as there is currently no
functionality that requires a return value
- prevent strokes when deselecting (which fixes#1797)
- fix copy constructor of Tool
- fix cyclic dependency in InputUtils using forward declaration
- add documentation on most changed functions
- improve the readability of input handlers
- rename SettingsEnums::Buttons to SettingsEnums::Button
- put warning code for TouchDrawingInputHandler into InputUtils for it
to be usable by InputSequence as well
- improve naming of functions in ButtonConfig
- add CMAKE_EXPORT_COMPILE_COMMANDS ON to allow the IDE to know about
all includes
- instead of using a specific Enum in ToolHandler reusing the
SettingsEnums
- fixing a possible regression introduced earlier for the TouchDrawing
functionality by introducing an additional "Tool" in the ToolHandler
for this
- introduce an InputUtils to reuse similar code between
MouseInputHandler, StylusInputHandler, TouchDrawingInputHandler,
InputSequence
- prevent unnecessary trigger of fireToolChanged in cases not necessary
- fix naming of stylus button Enums
- separate functionalities of toolColorChanged in separate functions
- only call fireToolChanged if tool actualy changed in
pointCurrentToolToButtonTool and its inverse
in `ToolHandler::pointCurrentToolToButtonTool` and
`ToolHandler::pointCurrentToolToToolbarTool` the functions
`toolColorChanged` and `toolSizeChanged` were called even though they are
already called as part of `fireToolChanged()`.
Hence, they can be removed.
This Commit includes a refactor with the main change of splitting the
previous toolbarSelectedTool Enum into:
- Button
- SelectedTool
Furthermore the mouse button now use the same mechanism as the stylus
buttons for consistency.