pencil2d / pencil

Pencil2D is an easy, intuitive tool to make 2D hand-drawn animations. Pencil2D is open source and cross-platform.
http://pencil2d.org
GNU General Public License v2.0
1.45k stars 272 forks source link

Canvas not updating properly when view updates occur while some tools are active #1837

Open scribblemaniac opened 5 months ago

scribblemaniac commented 5 months ago

Issue Summary

When some tools are actively being used (mostly notably while drawing a path with the polyline tool), triggering some view events, such as zooming in or out, or toggling overlays will not update the whole canvas as it should.

Actual Results

With a polyline path active, when zooming with the mouse wheel or keyboard shortcuts, the region around the tool cursor (if active) will be updated right away. If zooming through the status or action bar, nothing is immediately updated. If zooming with the ctrl+right/middle click, everything updates right away. After moving the mouse, the area around the polyline tool path will update, but not anything outside of that. Similar behavior occurs when toggling overlays, clearing the frame, or switching frames. When drawing with a drawing tool, less actions are possible, but this still occurs when zooming in or out with the keyboard shortcuts while actively drawing a stroke.

Expected Results

When taking "full canvas" actions such as zooming or toggling overlays, the entire canvas should be forced to update, or at the very least all the parts with content.

Video or Image Reference

Zoom Update Issue.webm

### Steps to reproduce Example: 1. Start drawing a polyline path. 2. Scroll with the mouse wheel ### System Information + Pencil2D Version: d904335 + Operating System: Ubuntu 22.04 + RAM Size: 16GB + Graphics Tablet: N/A