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

Assertion failure when selection is moved with arrows #1838

Open
scribblemaniac opened this issue Apr 29, 2024 · 0 comments
Open

Assertion failure when selection is moved with arrows #1838

scribblemaniac opened this issue Apr 29, 2024 · 0 comments
Labels
Bug Canvas Crash Select Tool UI Related to the visual appearance of the program

Comments

@scribblemaniac
Copy link
Member

Issue Summary

The selection can be modified using the arrow keys without using the move tool, breaking some of the assumptions of canvaspainter.

Actual Results

When a selection is made, moved with the arrow keys and then the canvas is painted on with a drawing tool, all without selecting the move tool, then this assert will be triggered, and crash on debug builds.

If the assert is ignored, as it would be in a release build, then the selection does not get applied before drawing and the drawing tool will behave as if the selection has not been transformed. This will result in some visual anomalies as the brush data conflicts with the selection data. After each stroke is finished, the program behaves as if the stroke had been drawn before the selection was transformed, and the selection remains active with a transformation.

Expected Results

It is expected that the assert does not fail obviously. Perhaps the easiest and best solution would be for the arrow key shortcuts to only transform selections while the move tool is active. It would also make sense to be able to move the selection bounds (without the content) with the arrow keys when the select tool is active.

Steps to reproduce

  1. Create a selection.
  2. Switch to the pen tool.
  3. Use the arrow keys to move the selection.
  4. Attempt to draw through the selection with the pen tool.

System Information

  • Operating System: Ubuntu 22.04
  • RAM Size: 16GB
  • Graphics Tablet: N/A

Developer Notes

This issue was previously noted in the PR in which it was introduced (#1807 (comment)), though after it had already been merged. I have created this separate issue for tracking purposes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Canvas Crash Select Tool UI Related to the visual appearance of the program
Projects
None yet
Development

No branches or pull requests

1 participant