mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-29 02:28:13 +08:00
Implement layer renaming (#501)
* Implement layer renaming * Fix sneaky typo in CSS Co-authored-by: Moritz Vetter <16950410+HansAuger@users.noreply.github.com> Co-authored-by: Moritz Vetter <16950410+HansAuger@users.noreply.github.com>
This commit is contained in:
co-authored by
Moritz Vetter
parent
7910395191
commit
dae79caf15
@@ -641,6 +641,13 @@ impl Document {
|
||||
layer.visible = *visible;
|
||||
Some([vec![DocumentChanged], update_thumbnails_upstream(path)].concat())
|
||||
}
|
||||
Operation::SetLayerName { path, name } => {
|
||||
self.mark_as_dirty(path)?;
|
||||
let mut layer = self.layer_mut(path)?;
|
||||
layer.name = if name.as_str() == "" { None } else { Some(name.clone()) };
|
||||
|
||||
Some(vec![LayerChanged { path: path.clone() }])
|
||||
}
|
||||
Operation::SetLayerBlendMode { path, blend_mode } => {
|
||||
self.mark_as_dirty(path)?;
|
||||
self.layer_mut(path)?.blend_mode = *blend_mode;
|
||||
|
||||
Reference in New Issue
Block a user