[Sketcher] Constraint driving/driven status integration in dimension edition dialog

This integrates the ability to manage dimensional constraint driving/driven status
 in the constraint edition dialog box.
 It adds a checkbox in the dialog to show/select whether a constraint is driving or
 driven. When the constraint value is modified, it is automatically set as driving.
 Main focus is to allow to edit name (alias) of reference (driven) constraints
 directly in the constraint edition box.

 Resolves #3793, #3978
This commit is contained in:
0penBrain
2020-03-17 22:15:04 +01:00
committed by wmayer
parent 71192a9129
commit d520de1aba
6 changed files with 149 additions and 174 deletions

View File

@@ -1022,14 +1022,11 @@ void ViewProviderSketch::editDoubleClicked(void)
// if its the right constraint
if (Constr->isDimensional()) {
if(!Constr->isDriving) {
Gui::cmdAppObjectArgs(getObject(), "setDriving(%i,%s)", id, "True");
}
// Coin's SoIdleSensor causes problems on some platform while Qt seems to work properly (#0001517)
Gui::Command::openCommand("Modify sketch constraints");
EditDatumDialog *editDatumDialog = new EditDatumDialog(this, id);
QCoreApplication::postEvent(editDatumDialog, new QEvent(QEvent::User));
//QCoreApplication::postEvent(editDatumDialog, new QEvent(QEvent::User));
editDatumDialog->exec();
edit->editDatumDialog = true; // avoid to double handle "ESC"
}
}