diff --git a/src/Mod/TechDraw/Gui/DrawGuiUtil.cpp b/src/Mod/TechDraw/Gui/DrawGuiUtil.cpp index 0c5b137723..377f556fd4 100644 --- a/src/Mod/TechDraw/Gui/DrawGuiUtil.cpp +++ b/src/Mod/TechDraw/Gui/DrawGuiUtil.cpp @@ -650,7 +650,7 @@ std::pair DrawGuiUtil::getProjDirFromFace(App::D | Part::ShapeOption::ResolveLink | Part::ShapeOption::Transform, faceName.c_str()); - + if (ts.IsNull() || ts.ShapeType() != TopAbs_FACE) { Base::Console().warning("getProjDirFromFace(%s) is not a Face\n", faceName.c_str()); return dirs; diff --git a/src/Mod/TechDraw/Gui/PATPathMaker.h b/src/Mod/TechDraw/Gui/PATPathMaker.h index ced1214845..be5df7f72a 100644 --- a/src/Mod/TechDraw/Gui/PATPathMaker.h +++ b/src/Mod/TechDraw/Gui/PATPathMaker.h @@ -45,7 +45,7 @@ public: void setPen(QPen pen) { m_pen = pen; } QPen getPen() { return m_pen; } void setParent(QGraphicsItem* parent) { m_parent = parent; } - + void lineSetToFillItems(TechDraw::LineSet& ls); protected: diff --git a/src/Mod/TechDraw/Gui/QGISVGTemplate.cpp b/src/Mod/TechDraw/Gui/QGISVGTemplate.cpp index 425e768ec2..3e80f6010d 100644 --- a/src/Mod/TechDraw/Gui/QGISVGTemplate.cpp +++ b/src/Mod/TechDraw/Gui/QGISVGTemplate.cpp @@ -67,7 +67,7 @@ namespace { // No attribute and no parent nodes left? Defaulting: return QFont(QStringLiteral("sans")); } - + std::vector getFCElements(QDomDocument& doc) { QDomNodeList textElements = doc.elementsByTagName(QStringLiteral("text")); std::vector filteredTextElements; @@ -247,7 +247,7 @@ std::vector QGISVGTemplate::getTextFields() void QGISVGTemplate::clearClickHandles() { prepareGeometryChange(); - std::vector textFields = getTextFields(); + std::vector textFields = getTextFields(); for (auto& textField : textFields) { textField->hide(); scene()->removeItem(textField); @@ -284,7 +284,7 @@ void QGISVGTemplate::createClickHandles() // Get elements bounding box of text QString id = textElement.attribute(QStringLiteral("id")); QRectF textRect = m_svgRender->boundsOnElement(id); - + // Get tight bounding box of text QDomElement tspan = textElement.firstChildElement(); QFont font = getFont(tspan); @@ -300,7 +300,7 @@ void QGISVGTemplate::createClickHandles() // and both be in style attribute and native attribute font.setPointSizeF(1.5); fm = QFontMetricsF(font); - + if (tightTextRect.height() < fm.capHeight()) { tightTextRect.setTop(tightTextRect.bottom() - fm.capHeight()); } diff --git a/src/Mod/TechDraw/Gui/QGIView.cpp b/src/Mod/TechDraw/Gui/QGIView.cpp index d00853a3ec..d94bf85eca 100644 --- a/src/Mod/TechDraw/Gui/QGIView.cpp +++ b/src/Mod/TechDraw/Gui/QGIView.cpp @@ -200,7 +200,7 @@ QVariant QGIView::itemChange(GraphicsItemChange change, const QVariant &value) bool thisViewIsSelected = value.toBool(); bool anyChildSelected = false; if (!thisViewIsSelected) { // Only check children if this view is becoming unselected - anyChildSelected = + anyChildSelected = std::ranges::any_of(childItems(), [](QGraphicsItem* child) { return child->isSelected(); }); @@ -518,7 +518,7 @@ void QGIView::hoverEnterEvent(QGraphicsSceneHoverEvent *event) { QGraphicsItemGroup::hoverEnterEvent(event); - m_isHovered = true; + m_isHovered = true; if (isSelected()) { m_colCurrent = getSelectColor(); @@ -528,11 +528,11 @@ void QGIView::hoverEnterEvent(QGraphicsSceneHoverEvent *event) m_border->show(); m_label->show(); - + m_lock->setVisible(getViewObject()->isLocked() && getViewObject()->showLock()); - drawBorder(); - update(); + drawBorder(); + update(); } @@ -540,7 +540,7 @@ void QGIView::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) { QGraphicsItemGroup::hoverLeaveEvent(event); - m_isHovered = false; + m_isHovered = false; if (isSelected()) { m_colCurrent = getSelectColor(); @@ -551,11 +551,11 @@ void QGIView::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) m_colCurrent = PreferencesGui::getAccessibleQColor(PreferencesGui::normalQColor()); m_border->hide(); m_label->hide(); - m_lock->hide(); + m_lock->hide(); } - drawBorder(); - update(); + drawBorder(); + update(); } //sets position in /Gui(graphics), not /App @@ -798,7 +798,7 @@ QRectF QGIView::customChildrenBoundingRect() const if (!child->isVisible()) { continue; } - if ( + if ( child->type() != UserType::QGIRichAnno && child->type() != UserType::QGEPath && child->type() != UserType::QGMText && diff --git a/src/Mod/TechDraw/Gui/QGIViewPart.cpp b/src/Mod/TechDraw/Gui/QGIViewPart.cpp index 18139679ce..af2fa80b1a 100644 --- a/src/Mod/TechDraw/Gui/QGIViewPart.cpp +++ b/src/Mod/TechDraw/Gui/QGIViewPart.cpp @@ -830,7 +830,7 @@ void QGIViewPart::drawComplexSectionLine(TechDraw::DrawViewSection* viewSection, std::pair dirsDCS = dcs->sectionLineArrowDirsMapped(); sectionLine->setArrowDirections(dirsDCS.first, dirsDCS.second); - + //set the general parameters sectionLine->setPos(0.0, 0.0); diff --git a/src/Mod/TechDraw/TechDrawTools/CommandPositionSectionView.py b/src/Mod/TechDraw/TechDrawTools/CommandPositionSectionView.py index 1c0bff1b50..ccd1d36e2d 100644 --- a/src/Mod/TechDraw/TechDrawTools/CommandPositionSectionView.py +++ b/src/Mod/TechDraw/TechDrawTools/CommandPositionSectionView.py @@ -114,7 +114,7 @@ class CommandPositionSectionView: Parameters: p1, p2 : vertices of the hypotenuse dir : direction vector of one leg (kathete) - + Returns: p3 : the third vertex completing the right triangle ''' diff --git a/src/Mod/TechDraw/TechDrawTools/TaskHoleShaftFit.py b/src/Mod/TechDraw/TechDrawTools/TaskHoleShaftFit.py index 0dadcd3474..529a8c6bb7 100644 --- a/src/Mod/TechDraw/TechDrawTools/TaskHoleShaftFit.py +++ b/src/Mod/TechDraw/TechDrawTools/TaskHoleShaftFit.py @@ -94,7 +94,7 @@ class TaskHoleShaftFit: self.form.rbHoleBase.clicked.connect(partial(self.on_HoleShaftChanged, True)) self.form.rbShaftBase.clicked.connect(partial(self.on_HoleShaftChanged, False)) self.form.cbField.currentIndexChanged.connect(self.on_FieldChanged) - + App.setActiveTransaction("Add hole or shaft fit") def setHoleFields(self):