[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 <chennes@pioneerlibrarysystem.org>
This commit is contained in:
Syres916
2025-06-09 18:36:04 +01:00
committed by GitHub
parent 353c4eca55
commit fec8d924fe

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: