+ whitespace fixes, add curly braces to outer loop
This commit is contained in:
parent
24797fb65e
commit
b35d28a941
|
@ -1028,12 +1028,12 @@ void CmdSketcherConstrainPointOnObject::activated(int iMsg)
|
||||||
points.push_back(id);
|
points.push_back(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (points.size() == 1 && curves.size() >= 1
|
if (points.size() == 1 && curves.size() >= 1 ||
|
||||||
|| points.size() >= 1 && curves.size() == 1) {
|
points.size() >= 1 && curves.size() == 1) {
|
||||||
|
|
||||||
openCommand("add point on object constraint");
|
openCommand("add point on object constraint");
|
||||||
int cnt = 0;
|
int cnt = 0;
|
||||||
for (int iPnt = 0 ; iPnt < points.size() ; iPnt++)
|
for (int iPnt = 0; iPnt < points.size(); iPnt++) {
|
||||||
for (int iCrv = 0; iCrv < curves.size(); iCrv++) {
|
for (int iCrv = 0; iCrv < curves.size(); iCrv++) {
|
||||||
if (checkBothExternal(points[iPnt].GeoId, curves[iCrv].GeoId))
|
if (checkBothExternal(points[iPnt].GeoId, curves[iCrv].GeoId))
|
||||||
continue;
|
continue;
|
||||||
|
@ -1044,19 +1044,22 @@ void CmdSketcherConstrainPointOnObject::activated(int iMsg)
|
||||||
Doc,"App.ActiveDocument.%s.addConstraint(Sketcher.Constraint('PointOnObject',%d,%d,%d)) ",
|
Doc,"App.ActiveDocument.%s.addConstraint(Sketcher.Constraint('PointOnObject',%d,%d,%d)) ",
|
||||||
selection[0].getFeatName(),points[iPnt].GeoId, points[iPnt].PosId, curves[iCrv].GeoId);
|
selection[0].getFeatName(),points[iPnt].GeoId, points[iPnt].PosId, curves[iCrv].GeoId);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (cnt) {
|
if (cnt) {
|
||||||
commitCommand();
|
commitCommand();
|
||||||
getSelection().clearSelection();
|
getSelection().clearSelection();
|
||||||
} else {
|
} else {
|
||||||
abortCommand();
|
abortCommand();
|
||||||
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"),
|
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"),
|
||||||
QObject::tr("None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry."));
|
QObject::tr("None of the selected points were constrained onto the respective curves, either "
|
||||||
|
"because they are parts of the same element, or because they are both external geometry."));
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"),
|
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"),
|
||||||
QObject::tr("Select either one point and several curves, or one curve and several points. You have selected %1 curves and %2 points.").arg(curves.size()).arg(points.size()));
|
QObject::tr("Select either one point and several curves, or one curve and several points. "
|
||||||
|
"You have selected %1 curves and %2 points.").arg(curves.size()).arg(points.size()));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user