Skip to content

Commit

Permalink
TD: Trim trailing newlines
Browse files Browse the repository at this point in the history
  • Loading branch information
luzpaz authored and wwmayer committed Jul 14, 2024
1 parent 25e8aac commit 9c6e78b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/Mod/TechDraw/App/DrawViewCollection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ void DrawViewCollection::rebuildViewList()
const std::vector<App::DocumentObject*> currViews = Views.getValues();
std::vector<App::DocumentObject*> newViews;
for (auto* child : getOutList()) {
if (child->isDerivedFrom<DrawView>() ||
(child->isDerivedFrom<App::Link>()
if (child->isDerivedFrom<DrawView>() ||
(child->isDerivedFrom<App::Link>()
&& static_cast<App::Link*>(child)->getLinkedObject()->isDerivedFrom<DrawView>())) {
bool found = false;
for (auto& v:currViews) {
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/TechDraw/App/ShapeExtractor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ TopoDS_Shape ShapeExtractor::getShapes(const std::vector<App::DocumentObject*> l

if (isExplodedView) {
Py::Object explodedViewPy = proxy->getValue();

Py::Object attr = explodedViewPy.getAttr("restoreAssembly");
if (attr.ptr() && attr.isCallable()) {
Py::Tuple args(1);
Expand Down
6 changes: 3 additions & 3 deletions src/Mod/TechDraw/TechDrawTools/CommandAxoLengthDimension.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def Activated(self):
if len(vertexes)<2:
vertexes.append(edges[0].Vertexes[0])
vertexes.append(edges[0].Vertexes[1])

view = Utils.getSelView()
scale = view.getScale()

Expand All @@ -80,7 +80,7 @@ def Activated(self):
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:
Expand All @@ -97,7 +97,7 @@ def Activated(self):
(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):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def GetResources(self):
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:<br>\
- Select a single section view<br>\
- Click this tool<br>\
Expand Down

0 comments on commit 9c6e78b

Please sign in to comment.