Fixes for removing artboards; white infinite canvas background (#1497)

* Fix crash when drawing on a deleted artboard

* Fix clear artboards button

* White background on no artboards

* Re-disable Clear Artboards since it still crashes

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
0HyperCube
2023-12-10 00:17:18 +00:00
committed by GitHub
co-authored by Keavon Chambers
parent 33845707db
commit b60736c2c6
6 changed files with 43 additions and 4 deletions
@@ -48,6 +48,10 @@ impl Resize {
let Some(layer) = self.layer else {
return None;
};
if !document.network().nodes.contains_key(&layer.to_node()) {
self.layer.take();
return None;
}
let mut start = self.viewport_drag_start(document);
let stop = self.snap_manager.snap_position(responses, document, ipp.mouse.position);