[Sketcher] Constraints Allow User to...
...set Diameter as default constraint for Arcs and Circles See discussion : https://forum.freecadweb.org/viewtopic.php?f=3&t=57054
This commit is contained in:
committed by
Abdullah Tahiri
parent
1d867d9b9d
commit
5161b32b65
@@ -5891,9 +5891,18 @@ Gui::Action * CmdSketcherCompConstrainRadDia::createAction(void)
|
||||
_pcAction = pcAction;
|
||||
languageChange();
|
||||
|
||||
pcAction->setIcon(arc1->icon());
|
||||
int defaultId = 0;
|
||||
pcAction->setProperty("defaultAction", QVariant(defaultId));
|
||||
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Sketcher");
|
||||
bool defDiaConstrain = hGrp->GetBool("DefaultDiaConstraint", false);
|
||||
|
||||
if (defDiaConstrain) {
|
||||
pcAction->setIcon(arc2->icon());
|
||||
int defaultId = 1;
|
||||
pcAction->setProperty("defaultAction", QVariant(defaultId));
|
||||
} else {
|
||||
pcAction->setIcon(arc1->icon());
|
||||
int defaultId = 0;
|
||||
pcAction->setProperty("defaultAction", QVariant(defaultId));
|
||||
}
|
||||
|
||||
pcAction->setShortcut(QString::fromLatin1(sAccel));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user