From 0967b3b3f42fa245651ba8371e4ec47b7d27df9c Mon Sep 17 00:00:00 2001 From: Syres916 <46537884+Syres916@users.noreply.github.com> Date: Mon, 9 Jun 2025 18:36:04 +0100 Subject: [PATCH] [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 --- src/Mod/BIM/bimcommands/BimViews.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Mod/BIM/bimcommands/BimViews.py b/src/Mod/BIM/bimcommands/BimViews.py index 588dd1f530..64cae3cc5d 100644 --- a/src/Mod/BIM/bimcommands/BimViews.py +++ b/src/Mod/BIM/bimcommands/BimViews.py @@ -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: