Sketcher: No equality to be applied to external axes

fixes #3532
This commit is contained in:
Abdullah Tahiri
2018-09-28 16:30:31 +02:00
committed by wmayer
parent d1eb5f19a8
commit 80e4b36f37

View File

@@ -6606,18 +6606,20 @@ void CmdSketcherConstrainEqual::activated(int iMsg)
QObject::tr("Select two or more compatible edges"));
return;
}
else if (isPointOrSegmentFixed(Obj,GeoId)) {
if (GeoId == Sketcher::GeoEnum::HAxis || GeoId == Sketcher::GeoEnum::VAxis) {
else if (GeoId == Sketcher::GeoEnum::HAxis || GeoId == Sketcher::GeoEnum::VAxis) {
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"),
QObject::tr("Sketch axes cannot be used in equality constraints"));
return;
}
else if (hasAlreadyExternal) {
}
else if (isPointOrSegmentFixed(Obj,GeoId)) {
if (hasAlreadyExternal) {
showNoConstraintBetweenFixedGeometry();
return;
}
else
else {
hasAlreadyExternal = true;
}
}
const Part::Geometry *geo = Obj->getGeometry(GeoId);