Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #4217: Disable mouse stabilizer while previewing a straight line #4395

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

belchiorg
Copy link

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

  • Added a statement to deactivate the stabilizer when the Shift key is pressed during freehand drawing events.
  • Integrated the modified stabilizer behavior into the drawing tool's event handling mechanism.

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

…ht line

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.
@belchiorg belchiorg requested a review from dacap as a code owner April 2, 2024 14:24
@aseprite-bot
Copy link
Collaborator

clang-tidy review says "All clean, LGTM! 👍"

@dacap dacap self-assigned this Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants