From 9c6e78b5cb354efbddcc9301f4fa37e19615fdfd Mon Sep 17 00:00:00 2001 From: luzpaz Date: Sat, 13 Jul 2024 15:50:05 +0000 Subject: [PATCH] TD: Trim trailing newlines --- src/Mod/TechDraw/App/DrawViewCollection.cpp | 4 ++-- src/Mod/TechDraw/App/ShapeExtractor.cpp | 2 +- src/Mod/TechDraw/TechDrawTools/CommandAxoLengthDimension.py | 6 +++--- .../TechDraw/TechDrawTools/CommandPositionSectionView.py | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Mod/TechDraw/App/DrawViewCollection.cpp b/src/Mod/TechDraw/App/DrawViewCollection.cpp index 19125afb86..b2b0cf95f2 100644 --- a/src/Mod/TechDraw/App/DrawViewCollection.cpp +++ b/src/Mod/TechDraw/App/DrawViewCollection.cpp @@ -152,8 +152,8 @@ void DrawViewCollection::rebuildViewList() const std::vector currViews = Views.getValues(); std::vector newViews; for (auto* child : getOutList()) { - if (child->isDerivedFrom() || - (child->isDerivedFrom() + if (child->isDerivedFrom() || + (child->isDerivedFrom() && static_cast(child)->getLinkedObject()->isDerivedFrom())) { bool found = false; for (auto& v:currViews) { diff --git a/src/Mod/TechDraw/App/ShapeExtractor.cpp b/src/Mod/TechDraw/App/ShapeExtractor.cpp index 5e2d8efea4..794bc71b66 100644 --- a/src/Mod/TechDraw/App/ShapeExtractor.cpp +++ b/src/Mod/TechDraw/App/ShapeExtractor.cpp @@ -147,7 +147,7 @@ TopoDS_Shape ShapeExtractor::getShapes(const std::vector l if (isExplodedView) { Py::Object explodedViewPy = proxy->getValue(); - + Py::Object attr = explodedViewPy.getAttr("restoreAssembly"); if (attr.ptr() && attr.isCallable()) { Py::Tuple args(1); diff --git a/src/Mod/TechDraw/TechDrawTools/CommandAxoLengthDimension.py b/src/Mod/TechDraw/TechDrawTools/CommandAxoLengthDimension.py index c1fd9a34c8..ce2d49b292 100644 --- a/src/Mod/TechDraw/TechDrawTools/CommandAxoLengthDimension.py +++ b/src/Mod/TechDraw/TechDrawTools/CommandAxoLengthDimension.py @@ -69,7 +69,7 @@ class CommandAxoLengthDimension: if len(vertexes)<2: vertexes.append(edges[0].Vertexes[0]) vertexes.append(edges[0].Vertexes[1]) - + view = Utils.getSelView() scale = view.getScale() @@ -80,7 +80,7 @@ class CommandAxoLengthDimension: xAxis = App.Vector(1,0,0) extAngle = degrees(extLineVec.getAngle(xAxis)) lineAngle = degrees(dimLineVec.getAngle(xAxis)) - + if extLineVec.y < 0.0: extAngle = 180-extAngle if dimLineVec.y < 0.0: @@ -97,7 +97,7 @@ class CommandAxoLengthDimension: (px,py,pz) = Utils.getCoordinateVectors(view) arrowTips = distanceDim.getArrowPositions() value2D = (arrowTips[1].sub(arrowTips[0])).Length - value3D = 1.0 + value3D = 1.0 if px.isParallel(dimLineVec,0.1): value3D = value2D/px.Length elif py.isParallel(dimLineVec,0.1): diff --git a/src/Mod/TechDraw/TechDrawTools/CommandPositionSectionView.py b/src/Mod/TechDraw/TechDrawTools/CommandPositionSectionView.py index 11b109ed3a..af6bf2a4e3 100644 --- a/src/Mod/TechDraw/TechDrawTools/CommandPositionSectionView.py +++ b/src/Mod/TechDraw/TechDrawTools/CommandPositionSectionView.py @@ -49,7 +49,7 @@ class CommandPositionSectionView: return {'Pixmap': 'TechDraw_ExtensionPositionSectionView.svg', 'Accel': "", 'MenuText': QT_TRANSLATE_NOOP("TechDraw_PositionSectionView", "Position Section View"), - 'ToolTip': QT_TRANSLATE_NOOP("TechDraw_PositionSectionView", + 'ToolTip': QT_TRANSLATE_NOOP("TechDraw_PositionSectionView", "Orthogonally align a section view with its source view:
\ - Select a single section view
\ - Click this tool
\