1
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2026-03-05 00:12:49 +01:00

fix(widget_state_manager): visibility managed by parent

This commit is contained in:
2025-11-20 21:58:37 +01:00
committed by Klaus Wakonig
parent fd2b8918f5
commit dc30e6b022

View File

@@ -109,9 +109,11 @@ class WidgetStateManager:
prop = meta.property(i)
name = prop.name()
# Always save `visible` as True to avoid restoring hidden widgets from profiles.
# Skip persisting QWidget visibility because container widgets (e.g. tab
# stacks, dock managers) manage that state themselves. Restoring a saved
# False can permanently hide a widget, while forcing True makes hidden
# tabs show on top. Leave the property to the parent widget instead.
if name == "visible":
settings.setValue(name, True)
continue
if (
@@ -170,6 +172,8 @@ class WidgetStateManager:
for i in range(meta.propertyCount()):
prop = meta.property(i)
name = prop.name()
if name == "visible":
continue
if settings.contains(name):
value = settings.value(name)
widget.setProperty(name, value)