diff --git a/src/Mod/Sketcher/Gui/SketcherSettings.cpp b/src/Mod/Sketcher/Gui/SketcherSettings.cpp index 69fff96822..a316235e49 100644 --- a/src/Mod/Sketcher/Gui/SketcherSettings.cpp +++ b/src/Mod/Sketcher/Gui/SketcherSettings.cpp @@ -67,6 +67,7 @@ void SketcherSettings::saveSettings() ui->checkBoxNotifyConstraintSubstitutions->onSave(); ui->checkBoxAutoRemoveRedundants->onSave(); ui->checkBoxUnifiedCoincident->onSave(); + ui->checkBoxHorVerAuto->onSave(); enum { @@ -135,6 +136,7 @@ void SketcherSettings::loadSettings() ui->checkBoxNotifyConstraintSubstitutions->onRestore(); ui->checkBoxAutoRemoveRedundants->onRestore(); ui->checkBoxUnifiedCoincident->onRestore(); + ui->checkBoxHorVerAuto->onRestore(); // Dimensioning constraints mode ui->dimensioningMode->clear(); diff --git a/src/Mod/Sketcher/Gui/SketcherSettings.ui b/src/Mod/Sketcher/Gui/SketcherSettings.ui index 2bc1a4da76..a3efd77d5f 100644 --- a/src/Mod/Sketcher/Gui/SketcherSettings.ui +++ b/src/Mod/Sketcher/Gui/SketcherSettings.ui @@ -178,6 +178,25 @@ Requires to re-enter edit mode to take effect. + + + + Use the automatic horizontal/vertical constraint tool. This create a command group in which you have the auto tool, horizontal and vertical. + + + Auto tool for Horizontal/Vertical + + + true + + + AutoHorVer + + + Mod/Sketcher/Constraints + + + diff --git a/src/Mod/Sketcher/Gui/Workbench.cpp b/src/Mod/Sketcher/Gui/Workbench.cpp index 3720c7ad8e..0cc9a4a5bc 100644 --- a/src/Mod/Sketcher/Gui/Workbench.cpp +++ b/src/Mod/Sketcher/Gui/Workbench.cpp @@ -476,8 +476,14 @@ inline void SketcherAddWorkbenchConstraints(Gui::ToolBarItem& cons << "Sketcher_ConstrainCoincident" << "Sketcher_ConstrainPointOnObject"; } - cons << "Sketcher_CompHorVer" - << "Sketcher_ConstrainParallel" + if (hGrp->GetBool("AutoHorVer", true)) { + cons << "Sketcher_CompHorVer"; + } + else { + cons << "Sketcher_ConstrainVertical" + << "Sketcher_ConstrainHorizontal"; + } + cons << "Sketcher_ConstrainParallel" << "Sketcher_ConstrainPerpendicular" << "Sketcher_ConstrainTangent" << "Sketcher_ConstrainEqual"