PATH:units added Gui::InputField to some parms

old spinboxes were not aware of units so I substituted in the custom FreeCAD Gui:InputField on countour, profile, profile edges, and pocket operations.
This commit is contained in:
Dan Falck
2016-12-24 17:28:40 -08:00
parent 605d4da85f
commit 388ddcf2b2
9 changed files with 237 additions and 187 deletions

View File

@@ -190,16 +190,6 @@ class ToolLibraryManager():
headers = ["","Tool Num.","Name","Tool Type","Material","Diameter","Length Offset","Flat Radius","Corner Radius","Cutting Edge Angle","Cutting Edge Height"]
model = QtGui.QStandardItemModel()
model.setHorizontalHeaderLabels(headers)
parms = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Units")
digits = parms.GetContents()[1][2] # user's number of digits of precision
if parms.GetContents()[0][2]==0:
suffix = 'mm'
conversion = 1.0
elif parms.GetContents()[0][2]==3:
suffix = 'in'
conversion = 25.4
else:
suffix = ''
def unitconv(ivalue):
parms = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Units")