Fix trailing newlines and minor typo fixes

This commit is contained in:
luzpaz
2024-07-23 12:13:36 +00:00
committed by wwmayer
parent a19f4dd398
commit bc150dc73c
19 changed files with 29 additions and 29 deletions

View File

@@ -217,7 +217,7 @@ def make_label(target_point=App.Vector(0, 0, 0),
placement = App.Placement(placement, App.Rotation())
elif isinstance(placement, App.Rotation):
placement = App.Placement(App.Vector(), placement)
if target_object:
if isinstance(target_object, (list, tuple)):
_err(translate("draft","Wrong input: target_object must not be a list."))

View File

@@ -313,7 +313,7 @@ public:
* Legacy values are thosed contained in old format files that don't fit in the new
* property format. It should not be used as a catch all for defining a property with
* no model.
*
*
* These values are transient and will not be saved.
*/
void setLegacyValue(const QString& name, const QString& value);

View File

@@ -127,7 +127,7 @@ void MeasureLength::onChanged(const App::Property* prop)
if (prop == &Elements) {
recalculateLength();
}
MeasureBase::onChanged(prop);
}
@@ -142,7 +142,7 @@ Base::Placement MeasureLength::getPlacement() {
App::SubObjectT subject{objects.front(), subElements.front().c_str()};
auto info = getMeasureInfo(subject);
if (!info || !info->valid) {
return {};
}

View File

@@ -104,7 +104,7 @@ bool MeasureRadius::isPrioritizedSelection(const App::MeasureSelection& selectio
//! Set properties from first item in selection. assumes a valid selection.
void MeasureRadius::parseSelection(const App::MeasureSelection& selection) {
auto element = selection.front();
auto objT = element.object;
auto objT = element.object;
std::vector<std::string> subElementList { objT.getSubName() };
Element.setValue(objT.getObject(), subElementList);
@@ -132,7 +132,7 @@ void MeasureRadius::onChanged(const App::Property* prop)
if (prop == &Element) {
recalculateRadius();
}
MeasureBase::onChanged(prop);
}

View File

@@ -64,7 +64,7 @@ SET(MeasureGui_SRCS
DlgPrefsMeasureAppearanceImp.ui
DlgPrefsMeasureAppearanceImp.cpp
DlgPrefsMeasureAppearanceImp.h
)
SET(MeasureGuiTaskDlgs_SRCS

View File

@@ -31,7 +31,7 @@ class MeasureBasePython(ABC):
@abstractclassmethod
def isPrioritySelection(cls, selection):
"""Returns True if creation of this measurement should be priorized over other measurements for the given selection"""
"""Returns True if creation of this measurement should be prioritized over other measurements for the given selection"""
pass
@abstractclassmethod

View File

@@ -271,7 +271,7 @@ App::DocumentObjectExecReturn* Helix::execute()
if (boolOp.IsNull())
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Error: Result is not a solid"));
if (!isSingleSolidRuleSatisfied(boolOp)) {
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Error: Result has multiple solids"));
}

View File

@@ -78,7 +78,7 @@ class TestHelix(unittest.TestCase):
body.addObject(helix)
helix.Profile = profileSketch
helix.ReferenceAxis = (profileSketch,"V_Axis")
helix.Placement = FreeCAD.Placement(FreeCAD.Vector(0,0,0),
helix.Placement = FreeCAD.Placement(FreeCAD.Vector(0,0,0),
FreeCAD.Rotation(FreeCAD.Vector(0,0,1),0),
FreeCAD.Vector(0,0,0))
helix.Pitch = 3
@@ -119,7 +119,7 @@ class TestHelix(unittest.TestCase):
helix.Height = 150
helix.Turns = 3
helix.Angle = 0
helix.Mode = 0
helix.Mode = 0
self.Doc.recompute()
bbox = helix.Shape.BoundBox
self.assertAlmostEqual(bbox.YMin,0)
@@ -171,7 +171,7 @@ class TestHelix(unittest.TestCase):
helix.Height = 110
helix.Turns = 2.2
helix.Angle = 30
helix.Mode = 0
helix.Mode = 0
helix.Reversed = True
self.Doc.recompute()
self.assertAlmostEqual(helix.Shape.Volume/1e5, 3.8828,places=4)

View File

@@ -66,7 +66,7 @@ public:
fbo = new QtGLFramebufferObject(v->getGLWidget()->size());
fbo->bind();
fbo->release();
view->getSoRenderManager()->scheduleRedraw();
}
#ifndef GL_MULTISAMPLE