New stroke doesn't render when start position is not visible
Describe the bug
When drawing a stroke and scrolling, so that the beginning of the stroke is off the view, the stroke won't be visible.
To Reproduce
Steps to reproduce the behavior:
- Start drawing a stroke
- Scroll so the start position is off the window
- Observer stroke not rendering
Expected behavior
The stroke should render
Console Output
No output.
Screenshots See the mouse state in the bottom left corner
https://github.com/flxzt/rnote/assets/29818440/216e24be-b0a0-49f7-9d07-2983887671a6
Desktop (please complete the following information):
- OS: NixOS (nixos-unstable)
- App Version: Rnote v0.9.2
- Installation Source: nixpkgs
- Desktop Environment: dwm
Additional context
I discovered this bug when experimenting with a touchpad gesture in rnote: with 2 fingers, I can move the view instead of the cursor, and additionally by pressing down the left mouse button, I can draw with only moving the view and keeping the cursor stationary.
A minor related bug: when drawing a stroke and scrolling with a mouse without moving the cursor, the last line segment is not rendered, see the video.
https://github.com/flxzt/rnote/assets/29818440/8a5dc233-b200-4e07-9dee-ec511fd3fa0a
When releasing the mouse button everything works as expected (for this minor and the main issue too).