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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user