mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2025-08-04 13:30:48 +00:00
Fix broken Opacity slider in Layers panel (#2004)
Fix Opacity slider in Layers panel adding Transactions on_update and add Transactions when on_commit
This commit is contained in:
parent
8a1089938e
commit
b57c53a427
1 changed files with 1 additions and 5 deletions
|
@ -974,12 +974,7 @@ impl MessageHandler<DocumentMessage, DocumentMessageData<'_>> for DocumentMessag
|
|||
}
|
||||
DocumentMessage::SetOpacityForSelectedLayers { opacity } => {
|
||||
let opacity = opacity.clamp(0., 1.);
|
||||
let mut added_transaction = false;
|
||||
for layer in self.network_interface.selected_nodes(&[]).unwrap().selected_layers_except_artboards(&self.network_interface) {
|
||||
if !added_transaction {
|
||||
responses.add(DocumentMessage::AddTransaction);
|
||||
added_transaction = true;
|
||||
}
|
||||
responses.add(GraphOperationMessage::OpacitySet { layer, opacity });
|
||||
}
|
||||
}
|
||||
|
@ -1942,6 +1937,7 @@ impl DocumentMessageHandler {
|
|||
Message::NoOp
|
||||
}
|
||||
})
|
||||
.on_commit(|_| DocumentMessage::AddTransaction.into())
|
||||
.widget_holder(),
|
||||
//
|
||||
Separator::new(SeparatorType::Unrelated).widget_holder(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue