Skip to content

Commit 0935977

Browse files
committed
Minor cleanup
Signed-off-by: Patrick Avery <[email protected]>
1 parent 17a96cc commit 0935977

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

hexrdgui/calibration/wppf_options_dialog.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2024,18 +2024,17 @@ def _copy_texture_figs(self, obj1, obj2):
20242024
if obj1 is None or obj2 is None:
20252025
return
20262026

2027-
if isinstance(obj1, LeBail):
2027+
if any(not hasattr(x, 'texture_model') for x in (obj1, obj2)):
20282028
return
20292029

2030-
if hasattr(obj1, 'texture_model'):
2031-
for model_key, model1 in obj1.texture_model.items():
2032-
model2 = obj2.texture_model[model_key]
2033-
if model1 is None or model2 is None:
2034-
continue
2030+
for model_key, model1 in obj1.texture_model.items():
2031+
model2 = obj2.texture_model[model_key]
2032+
if model1 is None or model2 is None:
2033+
continue
20352034

2036-
if hasattr(model1, 'fig_new'):
2037-
model2.fig_new = model1.fig_new
2038-
model2.ax_new = model1.ax_new
2035+
if hasattr(model1, 'fig_new'):
2036+
model2.fig_new = model1.fig_new
2037+
model2.ax_new = model1.ax_new
20392038

20402039
def clear_texture_data(self):
20412040
obj = self._wppf_object

0 commit comments

Comments
 (0)