mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-02 23:08:11 +08:00
Fix layers losing their names upon being grouped (#1637)
* no message
* no message
* no message
* Make layers reserve their names when grouped
* remove redundancy
* replace String::from("") with String::new()
* Fix test
* Restore unrequested line break changes
* Avoid unwraps
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
co-authored by
Keavon Chambers
parent
128f76af7e
commit
a1f2a2b256
@@ -427,6 +427,7 @@ fn new_brush_layer(document: &DocumentMessageHandler, responses: &mut VecDeque<M
|
||||
nodes: HashMap::from([(NodeId(0), brush_node)]),
|
||||
parent: document.new_layer_parent(),
|
||||
insert_index: -1,
|
||||
alias: String::new(),
|
||||
});
|
||||
responses.add(NodeGraphMessage::SelectedNodesSet { nodes: vec![id] });
|
||||
|
||||
|
||||
@@ -341,7 +341,13 @@ impl SelectToolData {
|
||||
let id = NodeId(generate_uuid());
|
||||
let insert_index = -1;
|
||||
let layer = LayerNodeIdentifier::new_unchecked(id);
|
||||
responses.add(GraphOperationMessage::NewCustomLayer { id, nodes, parent, insert_index });
|
||||
responses.add(GraphOperationMessage::NewCustomLayer {
|
||||
id,
|
||||
nodes,
|
||||
parent,
|
||||
insert_index,
|
||||
alias: String::new(),
|
||||
});
|
||||
new_dragging.push(layer);
|
||||
}
|
||||
let nodes = new_dragging.iter().map(|layer| layer.to_node()).collect();
|
||||
|
||||
Reference in New Issue
Block a user