From 2a38329a178788a20e4d16566d314342871dae10 Mon Sep 17 00:00:00 2001 From: tommy-mor Date: Wed, 10 Mar 2021 15:28:58 -0800 Subject: [PATCH 1/2] let calculated attributes reference previous ones --- glue/dialogs/component_arithmetic/qt/component_arithmetic.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/glue/dialogs/component_arithmetic/qt/component_arithmetic.py b/glue/dialogs/component_arithmetic/qt/component_arithmetic.py index 836e6a31a..afbe51a77 100644 --- a/glue/dialogs/component_arithmetic/qt/component_arithmetic.py +++ b/glue/dialogs/component_arithmetic/qt/component_arithmetic.py @@ -214,7 +214,8 @@ def _edit_derived_component(self, event=None): references = {} for cid in (self.data.main_components + self.data.pixel_component_ids + - self.data.world_component_ids): + self.data.world_component_ids + + [x for x in self._components_derived[self.data] if x is not derived_cid]: if cid is not derived_cid: mapping[cid] = cid.label references[cid.label] = cid From 5c31d77220cbba63eff9b7f6b443b18adccca35a Mon Sep 17 00:00:00 2001 From: tommy-mor Date: Wed, 10 Mar 2021 15:39:56 -0800 Subject: [PATCH 2/2] fixed syntax error --- glue/dialogs/component_arithmetic/qt/component_arithmetic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glue/dialogs/component_arithmetic/qt/component_arithmetic.py b/glue/dialogs/component_arithmetic/qt/component_arithmetic.py index afbe51a77..885a74ebe 100644 --- a/glue/dialogs/component_arithmetic/qt/component_arithmetic.py +++ b/glue/dialogs/component_arithmetic/qt/component_arithmetic.py @@ -215,7 +215,7 @@ def _edit_derived_component(self, event=None): for cid in (self.data.main_components + self.data.pixel_component_ids + self.data.world_component_ids + - [x for x in self._components_derived[self.data] if x is not derived_cid]: + [x for x in self._components_derived[self.data] if x is not derived_cid]): if cid is not derived_cid: mapping[cid] = cid.label references[cid.label] = cid