BIM: Prevent opening several Layer Managers - issue #17983

This commit is contained in:
Yorik van Havre
2025-07-12 14:49:43 +02:00
committed by Chris Hennes
parent 5b241b1a1f
commit f389ba5214

View File

@@ -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):