TD: Trim trailing newlines

This commit is contained in:
luzpaz
2024-07-13 15:50:05 +00:00
committed by wwmayer
parent 25e8aacbe3
commit 9c6e78b5cb
4 changed files with 7 additions and 7 deletions

View File

@@ -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) {

View File

@@ -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);

View File

@@ -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):

View File

@@ -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:<br>\
- Select a single section view<br>\
- Click this tool<br>\