Draft GUI setfocus if lengthValue is not visible

If set focus on length instead of x coordinate is checked, Draft set the focus on it also if the lengthValue is not visible
This commit is contained in:
carlopav
2019-05-04 16:29:31 +02:00
committed by Yorik van Havre
parent d0beeb74da
commit 5860d67b64

View File

@@ -908,7 +908,7 @@ class DraftToolBar:
def setFocus(self):
p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Draft")
if p.GetBool("focusOnLength",False):
if p.GetBool("focusOnLength",False) and self.lengthValue.isVisible():
self.lengthValue.setFocus()
self.lengthValue.selectAll()
else: