From 87cbcb75fbd4d0fbf21b542f0093ad234e238a73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20=C3=89corchard?= Date: Thu, 23 Jan 2025 07:56:52 +0100 Subject: [PATCH] Exclude ui and svg from whitespace checking --- .pre-commit-config.yaml | 1 + Information/CenterOfMass.FCMacro | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ba1fa8c..7657911 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -34,6 +34,7 @@ repos: - id: forbid-submodules - id: mixed-line-ending - id: trailing-whitespace + exclude: '(\.ui|\.svg)$' - repo: https://github.com/asottile/pyupgrade rev: v3.19.1 hooks: diff --git a/Information/CenterOfMass.FCMacro b/Information/CenterOfMass.FCMacro index 0b855ae..f7555af 100644 --- a/Information/CenterOfMass.FCMacro +++ b/Information/CenterOfMass.FCMacro @@ -1072,7 +1072,7 @@ class CenterofmassWidget(QtGui.QWidget): for s_ in ('CoMBBoxOfSel', 'CoMLCS', 'CoMTotal', 'CoMPlaneYZ', 'CoMPlaneXZ', 'CoMPlaneXY'): if self.doc.getObject(s_): self.doc.removeObject(s_) - + # Bounding box of valid selection BBoxSolid = self.doc.addObject('Part::Box', 'CoMBBoxOfSel') BBoxSolid.Placement.Base = self.boundBox.Center.sub(app.Vector(boundBoxL).multiply(0.5))