Skip to content

Commit

Permalink
Draft GUI setfocus if lengthValue is not visible
Browse files Browse the repository at this point in the history
If set focus on length instead of x coordinate is checked, Draft set the focus on it also if the lengthValue is not visible
  • Loading branch information
carlopav authored and yorikvanhavre committed May 6, 2019
1 parent fa1a429 commit c17a899
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Mod/Draft/DraftGui.py
Expand Up @@ -908,7 +908,7 @@ def redraw(self):

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:
Expand Down

0 comments on commit c17a899

Please sign in to comment.