fix(color_picker): apply color when receiving ActionFinished message

This commit is contained in:
Michael Aaron Murphy 2024-03-07 00:08:04 +01:00 committed by Michael Murphy
parent e36f072c5a
commit 422d912634

View file

@ -188,7 +188,11 @@ impl ColorPickerModel {
}
ColorPickerUpdate::ActionFinished => {
let srgb = palette::Srgb::from_color(self.active_color);
if let Some(applied_color) = self.applied_color.take() {
self.recent_colors.push(applied_color);
}
self.applied_color = Some(Color::from(srgb));
self.active = false;
self.save_next = Some(Color::from(srgb));
}
ColorPickerUpdate::ToggleColorPicker => {