Fix artboard deletion (#1651)

* Fix `Document > Clear Artboards`

* Fix `Artboard Tool > Delete`

* fix graph disconnection when deleting artboard

* fix empty artboard deletion

* Code readability improvements

* fix `Clear Artboards`

* add comments

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
Karthik Prakash
2024-03-16 01:56:39 -07:00
committed by GitHub
co-authored by Keavon Chambers
parent 1a2a0e8757
commit 8bc389a3b4
3 changed files with 125 additions and 9 deletions
@@ -382,7 +382,7 @@ impl Fsm for ArtboardToolFsmState {
(_, ArtboardToolMessage::DeleteSelected) => {
if let Some(artboard) = tool_data.selected_artboard.take() {
let id = artboard.to_node();
responses.add(GraphOperationMessage::DeleteLayer { id });
responses.add(GraphOperationMessage::DeleteArtboard { id });
}
ArtboardToolFsmState::Ready
}