mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-04 10:28:11 +08:00
Clear properties panel and layer tree on close (#920)
* Clear properties panel and layer tree on close * Fix on close all documents Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
committed by
Keavon Chambers
co-authored by
Keavon Chambers
parent
002b0fc1dd
commit
509aab72c1
@@ -47,6 +47,7 @@ pub enum DocumentMessage {
|
||||
aggregate: AlignAggregate,
|
||||
},
|
||||
BooleanOperation(BooleanOperationType),
|
||||
ClearLayerTree,
|
||||
CommitTransaction,
|
||||
CreateEmptyFolder {
|
||||
container_path: Vec<LayerId>,
|
||||
|
||||
@@ -243,6 +243,20 @@ impl MessageHandler<DocumentMessage, (u64, &InputPreprocessorMessageHandler, &Pe
|
||||
);
|
||||
responses.push_back(CommitTransaction.into());
|
||||
}
|
||||
ClearLayerTree => {
|
||||
// Send an empty layer tree
|
||||
let data_buffer: RawBuffer = Self::default().serialize_root().into();
|
||||
responses.push_back(FrontendMessage::UpdateDocumentLayerTreeStructure { data_buffer }.into());
|
||||
|
||||
// Clear the options bar
|
||||
responses.push_back(
|
||||
LayoutMessage::SendLayout {
|
||||
layout: Layout::WidgetLayout(Default::default()),
|
||||
layout_target: LayoutTarget::LayerTreeOptions,
|
||||
}
|
||||
.into(),
|
||||
);
|
||||
}
|
||||
CommitTransaction => (),
|
||||
CreateEmptyFolder { mut container_path } => {
|
||||
let id = generate_uuid();
|
||||
|
||||
Reference in New Issue
Block a user