diff --git a/src/Mod/Sketcher/Gui/CommandConstraints.cpp b/src/Mod/Sketcher/Gui/CommandConstraints.cpp index f16ff8a05c..4d34476bd1 100644 --- a/src/Mod/Sketcher/Gui/CommandConstraints.cpp +++ b/src/Mod/Sketcher/Gui/CommandConstraints.cpp @@ -2339,8 +2339,12 @@ void CmdSketcherConstrainCoincident::activated(int iMsg) commitCommand(); tryAutoRecomputeIfNotSolve(Obj); - QMessageBox::information(Gui::getMainWindow(), QObject::tr("Constraint Substitution"), - QObject::tr("Endpoint to endpoint tangency was applied instead.")); + ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Sketcher/General"); + + if(hGrp->GetBool("NotifyConstraintSubstitutions", true)) { + QMessageBox::information(Gui::getMainWindow(), QObject::tr("Constraint Substitution"), + QObject::tr("Endpoint to endpoint tangency was applied instead.")); + } getSelection().clearSelection(); return; @@ -4561,9 +4565,12 @@ void CmdSketcherConstrainTangent::activated(int iMsg) commitCommand(); tryAutoRecomputeIfNotSolve(Obj); - QMessageBox::information(Gui::getMainWindow(), QObject::tr("Constraint Substitution"), + ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Sketcher/General"); + + if(hGrp->GetBool("NotifyConstraintSubstitutions", true)) { + QMessageBox::information(Gui::getMainWindow(), QObject::tr("Constraint Substitution"), QObject::tr("Endpoint to endpoint tangency was applied. The coincident constraint was deleted.")); - + } getSelection().clearSelection(); return; } diff --git a/src/Mod/Sketcher/Gui/SketcherSettings.cpp b/src/Mod/Sketcher/Gui/SketcherSettings.cpp index e215216c75..5f7aa495d8 100644 --- a/src/Mod/Sketcher/Gui/SketcherSettings.cpp +++ b/src/Mod/Sketcher/Gui/SketcherSettings.cpp @@ -106,6 +106,7 @@ void SketcherSettings::saveSettings() ui->checkBoxTVShowLinks->onSave(); ui->checkBoxTVShowSupport->onSave(); ui->checkBoxTVRestoreCamera->onSave(); + ui->checkBoxNotifyConstraintSubstitutions->onSave(); form->saveSettings(); ParameterGrp::handle hViewGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/View"); @@ -132,6 +133,7 @@ void SketcherSettings::loadSettings() ui->checkBoxTVShowLinks->onRestore(); ui->checkBoxTVShowSupport->onRestore(); ui->checkBoxTVRestoreCamera->onRestore(); + ui->checkBoxNotifyConstraintSubstitutions->onRestore(); form->loadSettings(); std::list sizes = Gui::Inventor::MarkerBitmaps::getSupportedSizes("CIRCLE_FILLED"); diff --git a/src/Mod/Sketcher/Gui/SketcherSettings.ui b/src/Mod/Sketcher/Gui/SketcherSettings.ui index 704344cf6b..ce1cf3b6d8 100644 --- a/src/Mod/Sketcher/Gui/SketcherSettings.ui +++ b/src/Mod/Sketcher/Gui/SketcherSettings.ui @@ -280,6 +280,61 @@ + + + + true + + + + 0 + 0 + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + + 0 + 0 + + + + Notifications + + + + + + Notify automatic constraint substitutions. + + + Notify automatic constraint substitutions + + + true + + + NotifyConstraintSubstitutions + + + Mod/Sketcher/General + + + + + +