Improve message ordering to use a stack (#707)

* Improve message ordering

* Resovle bug with widgets

* Less code duplication for UpdateOpenDocumentsList

* Fix layer panel
This commit is contained in:
0HyperCube
2022-07-01 19:11:15 +01:00
committed by Keavon Chambers
parent d12d805e2f
commit b2eae904d8
4 changed files with 39 additions and 44 deletions

View File

@@ -113,7 +113,7 @@ impl PathOutline {
/// Clears overlays for the seleted paths and removes references
pub fn clear_selected(&mut self, responses: &mut VecDeque<Message>) {
if let Some(path) = self.selected_overlay_paths.pop() {
while let Some(path) = self.selected_overlay_paths.pop() {
let operation = Operation::DeleteLayer { path };
responses.push_back(DocumentMessage::Overlays(operation.into()).into());
}