mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-17 23:38:06 +08:00
Add locked status selected node on CopyBuffer
This commit is contained in:
@@ -20,6 +20,7 @@ pub struct CopyBufferEntry {
|
||||
pub nodes: HashMap<NodeId, DocumentNode>,
|
||||
pub selected: bool,
|
||||
pub visible: bool,
|
||||
pub locked: bool,
|
||||
pub collapsed: bool,
|
||||
pub alias: String,
|
||||
}
|
||||
|
||||
@@ -203,6 +203,7 @@ impl MessageHandler<PortfolioMessage, PortfolioMessageData<'_>> for PortfolioMes
|
||||
.collect(),
|
||||
selected: active_document.selected_nodes.selected_layers_contains(layer, active_document.metadata()),
|
||||
visible: active_document.selected_nodes.layer_visible(layer, active_document.metadata()),
|
||||
locked: active_document.selected_nodes.layer_locked(layer, active_document.metadata()),
|
||||
collapsed: false,
|
||||
alias: previous_alias,
|
||||
});
|
||||
@@ -391,6 +392,9 @@ impl MessageHandler<PortfolioMessage, PortfolioMessageData<'_>> for PortfolioMes
|
||||
if !entry.visible {
|
||||
responses.add(NodeGraphMessage::SetVisibility { node_id: id, visible: false });
|
||||
}
|
||||
if entry.locked {
|
||||
responses.add(NodeGraphMessage::SetLocked { node_id: id, locked: true });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user