From 670e59eae7abcaf66ee62b60954abaeec2a7bb0c Mon Sep 17 00:00:00 2001 From: AjinkyaDahale Date: Tue, 20 Dec 2016 11:37:11 +0530 Subject: [PATCH] Lock constraint in always available when sketch is open Earlier it was available only when a selection is made --- src/Mod/Sketcher/Gui/CommandConstraints.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Mod/Sketcher/Gui/CommandConstraints.cpp b/src/Mod/Sketcher/Gui/CommandConstraints.cpp index f6bbd90d2..ccca1656e 100644 --- a/src/Mod/Sketcher/Gui/CommandConstraints.cpp +++ b/src/Mod/Sketcher/Gui/CommandConstraints.cpp @@ -67,6 +67,8 @@ ConstraintCreationMode constraintCreationMode=Driving; void ActivateHandler(Gui::Document *doc,DrawSketchHandler *handler); +bool isCreateGeoActive(Gui::Document *doc); + bool isCreateConstraintActive(Gui::Document *doc) { if (doc) { @@ -1197,7 +1199,8 @@ void CmdSketcherConstrainLock::updateAction(int mode) bool CmdSketcherConstrainLock::isActive(void) { - return isCreateConstraintActive( getActiveGuiDocument() ); + // return isCreateConstraintActive( getActiveGuiDocument() ); + return isCreateGeoActive( getActiveGuiDocument() ); }