From 1e2b7e40512b3a98496cc74ef7531ef5670ba80d Mon Sep 17 00:00:00 2001 From: Abdullah Tahiri Date: Fri, 15 Jun 2018 16:25:29 +0200 Subject: [PATCH] Sketcher: Support for editing datum dialog --- src/Mod/Sketcher/Gui/EditDatumDialog.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Mod/Sketcher/Gui/EditDatumDialog.cpp b/src/Mod/Sketcher/Gui/EditDatumDialog.cpp index 7ca7beca10..b268899997 100644 --- a/src/Mod/Sketcher/Gui/EditDatumDialog.cpp +++ b/src/Mod/Sketcher/Gui/EditDatumDialog.cpp @@ -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"));