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

Add tests for GRS transform cancellation #2467

Merged

Conversation

rahat2134
Copy link
Contributor

Fix part of #2465

This PR adds tests to verify that cancellation works properly for the GRS (Grab, Rotate, Scale) transformation operations.

I implemented tests that:
Create a rectangle
Start a transform operation (G/R/S)
Move the cursor to change the transform
Cancel the operation
Verify the transform is unchanged after cancellation

Copy link
Member

@0HyperCube 0HyperCube left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution; the code and approach look good.

Please can you also add a testcase that doesn't cancel to ensure that we don't get the original transform in that case? This ensures that we are actually testing that the cancelling works.

@rahat2134 rahat2134 marked this pull request as ready for review March 21, 2025 00:43
@rahat2134 rahat2134 requested a review from 0HyperCube March 21, 2025 00:43
@rahat2134
Copy link
Contributor Author

@0HyperCube @Keavon PTAL!

@rahat2134 rahat2134 requested review from 0HyperCube and Keavon March 21, 2025 17:39
Copy link
Member

@0HyperCube 0HyperCube left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look good; thanks for the contribution.

@0HyperCube 0HyperCube enabled auto-merge (squash) March 23, 2025 18:31
@0HyperCube 0HyperCube merged commit dd27f46 into GraphiteEditor:master Mar 23, 2025
4 checks passed
@0HyperCube 0HyperCube mentioned this pull request Mar 24, 2025
7 tasks
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.

3 participants