From f389ba5214fcf41d613003e31211d6ee2c4536ea Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Sat, 12 Jul 2025 14:49:43 +0200 Subject: [PATCH] BIM: Prevent opening several Layer Managers - issue #17983 --- src/Mod/BIM/bimcommands/BimLayers.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Mod/BIM/bimcommands/BimLayers.py b/src/Mod/BIM/bimcommands/BimLayers.py index 6c5385f0d1..fa2d542051 100644 --- a/src/Mod/BIM/bimcommands/BimLayers.py +++ b/src/Mod/BIM/bimcommands/BimLayers.py @@ -68,6 +68,10 @@ class BIM_Layers: from PySide import QtGui + # chech if the dialog is running) + if getattr(self, "dialog", None): + return + # store changes to be committed self.deleteList = [] @@ -286,7 +290,7 @@ class BIM_Layers: doc.recompute() # exit - self.dialog.reject() + return self.dialog.reject() def reject(self): "when Cancel button is pressed or dialog is closed" @@ -296,6 +300,9 @@ class BIM_Layers: pref.SetInt("LayersManagerWidth", self.dialog.width()) pref.SetInt("LayersManagerHeight", self.dialog.height()) + # wipe to let FreeCAD know the dialog has been closed + del self.dialog + return True def update(self):