Skip to content

Commit 29caccf

Browse files
committed
fix: update thickness widget
1 parent d53fa46 commit 29caccf

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

loopstructural/gui/modelling/stratigraphic_column/stratigraphic_unit.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,19 @@ def setData(self, data: Optional[dict] = None):
134134
if data:
135135
self.name = str(data.get("name", ""))
136136
self.colour = data.get("colour", "")
137+
# If a thickness value is provided, update the widget's thickness
138+
if 'thickness' in data and data.get('thickness') is not None:
139+
try:
140+
th = float(data.get('thickness'))
141+
except Exception:
142+
th = None
143+
if th is not None:
144+
# Use set_thickness to update spinbox without emitting thicknessChanged
145+
try:
146+
self.set_thickness(th)
147+
except Exception:
148+
# ignore GUI update failures
149+
pass
137150
else:
138151
self.name = ""
139152
self.colour = ""

0 commit comments

Comments
 (0)