Sketcher: Refactor code relating to dimensional constraint checks

This commit is contained in:
Abdullah Tahiri
2018-10-29 11:51:12 +01:00
committed by Yorik van Havre
parent 8e2e5d7b6a
commit 6a1aed66e2
5 changed files with 17 additions and 78 deletions

View File

@@ -73,13 +73,7 @@ void EditDatumDialog::customEvent(QEvent*)
void EditDatumDialog::exec(bool atCursor)
{
// Return if constraint doesn't have editable value
if (Constr->Type == Sketcher::Distance ||
Constr->Type == Sketcher::DistanceX ||
Constr->Type == Sketcher::DistanceY ||
Constr->Type == Sketcher::Radius ||
Constr->Type == Sketcher::Diameter ||
Constr->Type == Sketcher::Angle ||
Constr->Type == Sketcher::SnellsLaw) {
if (Constr->isDimensional()) {
if (sketch->hasConflicts()) {
QMessageBox::critical(qApp->activeWindow(), QObject::tr("Distance constraint"),