Add viewing/editing layer names, add Blend Mode node, and clean up Layer node (#1489)

This commit is contained in:
Keavon Chambers
2023-12-07 15:10:47 -08:00
committed by GitHub
parent b7e304a708
commit 60a9c27bf1
43 changed files with 437 additions and 463 deletions
-7
View File
@@ -1031,13 +1031,6 @@ impl Document {
layer.visible = visible;
Some([vec![DocumentChanged], update_thumbnails_upstream(&path)].concat())
}
Operation::SetLayerName { path, name } => {
self.mark_as_dirty(&path)?;
let layer = self.layer_mut(&path)?;
layer.name = if name.as_str() == "" { None } else { Some(name) };
Some(vec![LayerChanged { path }])
}
Operation::SetLayerBlendMode { path, blend_mode } => {
self.mark_as_dirty(&path)?;
self.layer_mut(&path)?.blend_mode = blend_mode;