Gui: fix group visibility toggle

Fixes #9277
This commit is contained in:
Zheng, Lei
2023-12-18 20:19:52 +08:00
committed by Yorik van Havre
parent c67562f7c3
commit 74a824cc47

View File

@@ -121,7 +121,11 @@ void ViewProviderGroupExtension::extensionShow() {
// when reading the Visibility property from file then do not hide the
// objects of this group because they have stored their visibility status, too
if (!getExtendedViewProvider()->isRestoring() ) {
//
// Property::User1 is used by ViewProviderDocumentObject to mark for
// temporary visibility changes. Do not propagate the change to children.
if (!getExtendedViewProvider()->isRestoring()
&& !getExtendedViewProvider()->Visibility.testStatus(App::Property::User1)) {
auto* group = getExtendedViewProvider()->getObject()->getExtensionByType<App::GroupExtension>();
for(auto obj : group->Group.getValues()) {
if(obj && !obj->Visibility.getValue())