fix typo in variable-name

This commit is contained in:
plc-user
2025-02-28 20:25:31 +01:00
parent 74e6657ca5
commit e987d8c271
2 changed files with 15 additions and 15 deletions

View File

@@ -1339,17 +1339,17 @@ void Conductor::calculateTextItemPosition()
relatedPotentialConductors(false).size() > 0) relatedPotentialConductors(false).size() > 0)
{ {
Conductor *longuest_conductor = longuestConductorInPotential(this); Conductor *longest_conductor = longestConductorInPotential(this);
//The longuest conductor isn't this conductor //The longest conductor isn't this conductor
//we call calculateTextItemPosition of the longuest conductor //we call calculateTextItemPosition of the longest conductor
if(longuest_conductor != this) if(longest_conductor != this)
{ {
longuest_conductor -> calculateTextItemPosition(); longest_conductor -> calculateTextItemPosition();
return; return;
} }
//At this point this conductor is the longuest conductor we hide all text of conductor_list //At this point this conductor is the longest conductor we hide all text of conductor_list
foreach (Conductor *c, relatedPotentialConductors(false)) { foreach (Conductor *c, relatedPotentialConductors(false)) {
c -> textItem() -> setVisible(false); c -> textItem() -> setVisible(false);
} }
@@ -2072,19 +2072,19 @@ QPointF Conductor::movePointIntoPolygon(const QPointF &point, const QPainterPath
} }
/** /**
@brief longuestConductorInPotential @brief longestConductorInPotential
@param conductor : a conductor in the potential to search @param conductor : a conductor in the potential to search
@param all_diagram : true -> search in the whole project, false -> search only in the diagram of conductor @param all_diagram : true -> search in the whole project, false -> search only in the diagram of conductor
@return the longuest conductor in the same potential of conductor @return the longest conductor in the same potential of conductor
*/ */
Conductor * longuestConductorInPotential(Conductor *conductor, bool all_diagram) { Conductor * longestConductorInPotential(Conductor *conductor, bool all_diagram) {
Conductor *longuest_conductor = conductor; Conductor *longest_conductor = conductor;
//Search the longuest conductor //Search the longest conductor
foreach (Conductor *c, conductor -> relatedPotentialConductors(all_diagram)) foreach (Conductor *c, conductor -> relatedPotentialConductors(all_diagram))
if (c -> length() > longuest_conductor -> length()) if (c -> length() > longest_conductor -> length())
longuest_conductor = c; longest_conductor = c;
return longuest_conductor; return longest_conductor;
} }
/** /**

View File

@@ -232,7 +232,7 @@ class Conductor : public QGraphicsObject
static QPointF movePointIntoPolygon(const QPointF &, const QPainterPath &); static QPointF movePointIntoPolygon(const QPointF &, const QPainterPath &);
}; };
Conductor * longuestConductorInPotential (Conductor *conductor, bool all_diagram = false); Conductor * longestConductorInPotential (Conductor *conductor, bool all_diagram = false);
QList <Conductor *> relatedConductors (const Conductor *conductor); QList <Conductor *> relatedConductors (const Conductor *conductor);