[BIM] Fix Attribute Error when user moves and then deletes the BimViewArea dock widget (#21830)

* [BIM] Fix attribute error when user deletes the BimViewArea dock widget

* [BIM] Fix Attribute Error for both Qt5 and Qt6

* Update src/Mod/BIM/bimcommands/BimViews.py

---------

Co-authored-by: Chris Hennes <[email protected]>
This commit is contained in:
Syres916
2025-06-09 17:36:04 +00:00
committed by GitHub
co-authored by Chris Hennes
parent 353c4eca55
commit fec8d924fe
+4 -1
View File
@@ -532,7 +532,10 @@ class BIM_Views:
def onDockLocationChanged(self, area):
"""Saves dock widget size and location"""
PARAMS.SetInt("BimViewArea", area.value)
if hasattr(area, "value"): # To support Qt5.15
PARAMS.SetInt("BimViewArea", area.value)
else:
PARAMS.SetInt("BimViewArea", int(area))
mw = FreeCADGui.getMainWindow()
vm = findWidget()
if vm: