fix #4217: Disable mouse stabilizer while previewing a straight line #4395
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request: Fixing Bug #4217
Description
This pull request addresses and fixes bug #4217 , where the stabilizer feature interferes with the creation of straight lines when the Shift key is pressed during freehand drawing.
Changes Made
Cause
The root cause of the issue was identified as a lack of logic within the StraightLine Tool to deactivate the stabilizer when the Shift key was pressed during freehand drawing.
Fix
To address the issue, the code was modified to include a statement that deactivates the stabilizer when a new DrawingState is created when starting line preview with shift key .
Thank you for considering this pull request. I look forward to your review and feedback.
This commit addresses the issue where the Shift+brush tool was not disabling the mouse stabilizer, leading to unintended behavior when previewing a line. This commit adds the necessary implementation to properly disable the stabilizer when Shift+brush tool is used. Additionally, the function DrawingState::disableMouseStabilizer() now calls ToolLoopManager::disableMouseStabilizer() to ensure the stabilizer is disabled correctly.
I agree that my contributions are licensed under the Individual Contributor License Agreement V4.0 ("CLA") as stated in https://github.com/igarastudio/cla/blob/main/cla.md
I have signed the CLA following the steps given in https://github.com/igarastudio/cla#signing