Sketcher: Support for editing datum dialog

This commit is contained in:
Abdullah Tahiri
2018-06-15 16:25:29 +02:00
committed by wmayer
parent a7870959d3
commit 1e2b7e4051

View File

@@ -76,7 +76,8 @@ void EditDatumDialog::exec(bool atCursor)
if (Constr->Type == Sketcher::Distance ||
Constr->Type == Sketcher::DistanceX ||
Constr->Type == Sketcher::DistanceY ||
Constr->Type == Sketcher::Radius ||
Constr->Type == Sketcher::Radius ||
Constr->Type == Sketcher::Diameter ||
Constr->Type == Sketcher::Angle ||
Constr->Type == Sketcher::SnellsLaw) {
@@ -109,6 +110,12 @@ void EditDatumDialog::exec(bool atCursor)
ui_ins_datum.label->setText(tr("Radius:"));
ui_ins_datum.labelEdit->setParamGrpPath(QByteArray("User parameter:BaseApp/History/SketcherLength"));
}
else if (Constr->Type == Sketcher::Diameter) {
dlg.setWindowTitle(tr("Insert diameter"));
init_val.setUnit(Base::Unit::Length);
ui_ins_datum.label->setText(tr("Diameter:"));
ui_ins_datum.labelEdit->setParamGrpPath(QByteArray("User parameter:BaseApp/History/SketcherLength"));
}
else if (Constr->Type == Sketcher::SnellsLaw) {
dlg.setWindowTitle(tr("Refractive index ratio", "Constraint_SnellsLaw"));
ui_ins_datum.label->setText(tr("Ratio n2/n1:", "Constraint_SnellsLaw"));