Move DeleteLayer to come before SelectionChanged on DeletedSelectedLayers (#1417)

* ignore render subpaths overlays if layer no longer exists

* make selection change event added after delete layers

---------

Co-authored-by: 0HyperCube <78500760+0HyperCube@users.noreply.github.com>
This commit is contained in:
Rob Bertram 2023-10-18 13:32:10 -04:00 committed by GitHub
parent 5827e989dc
commit 67edac4aca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -299,11 +299,11 @@ impl MessageHandler<DocumentMessage, (u64, &InputPreprocessorMessageHandler, &Pe
DeleteSelectedLayers => {
self.backup(responses);
responses.add_front(BroadcastEvent::SelectionChanged);
for path in self.selected_layers_without_children() {
responses.add_front(DocumentMessage::DeleteLayer { layer_path: path.to_vec() });
}
responses.add_front(BroadcastEvent::SelectionChanged);
responses.add(BroadcastEvent::DocumentIsDirty);
}
DeselectAllLayers => {