From 64fb8b4e7174ead0070adf08bf22790c504896ad Mon Sep 17 00:00:00 2001 From: Kyle Conroy Date: Fri, 15 Nov 2024 11:44:03 -0500 Subject: [PATCH] fix unmix state when changing value * used in RGB presets logic --- jdaviz/core/template_mixin.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jdaviz/core/template_mixin.py b/jdaviz/core/template_mixin.py index daa8e8e961..293871ade1 100644 --- a/jdaviz/core/template_mixin.py +++ b/jdaviz/core/template_mixin.py @@ -4480,7 +4480,10 @@ def _on_glue_value_changed(self, value): def unmix_state(self, new_value=None): if new_value is None: new_value = self.value - self._on_value_changed({'new': new_value}) + if new_value != self.value: + self.value = new_value + else: + self._on_value_changed({'new': new_value}) self.sync = {**self.sync, 'mixed': False}