Draft: Adapted input boxes to use Units->Decimals pref setting
This commit is contained in:
@@ -400,6 +400,7 @@ class _CommandStructure:
|
||||
|
||||
def taskbox(self):
|
||||
"sets up a taskbox widget"
|
||||
d = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Units").GetInt("Decimals",2)
|
||||
w = QtGui.QWidget()
|
||||
w.setWindowTitle(str(translate("Arch","Structure options")))
|
||||
lay0 = QtGui.QVBoxLayout(w)
|
||||
@@ -422,7 +423,7 @@ class _CommandStructure:
|
||||
label1 = QtGui.QLabel(str(translate("Arch","Length")))
|
||||
lay1.addWidget(label1)
|
||||
self.vLength = QtGui.QDoubleSpinBox()
|
||||
self.vLength.setDecimals(2)
|
||||
self.vLength.setDecimals(d)
|
||||
self.vLength.setMaximum(99999.99)
|
||||
self.vLength.setValue(self.Length)
|
||||
lay1.addWidget(self.vLength)
|
||||
@@ -433,7 +434,7 @@ class _CommandStructure:
|
||||
label2 = QtGui.QLabel(str(translate("Arch","Width")))
|
||||
lay2.addWidget(label2)
|
||||
self.vWidth = QtGui.QDoubleSpinBox()
|
||||
self.vWidth.setDecimals(2)
|
||||
self.vWidth.setDecimals(d)
|
||||
self.vWidth.setMaximum(99999.99)
|
||||
self.vWidth.setValue(self.Width)
|
||||
lay2.addWidget(self.vWidth)
|
||||
@@ -444,7 +445,7 @@ class _CommandStructure:
|
||||
label3 = QtGui.QLabel(str(translate("Arch","Height")))
|
||||
lay3.addWidget(label3)
|
||||
self.vHeight = QtGui.QDoubleSpinBox()
|
||||
self.vHeight.setDecimals(2)
|
||||
self.vHeight.setDecimals(d)
|
||||
self.vHeight.setMaximum(99999.99)
|
||||
self.vHeight.setValue(self.Height)
|
||||
lay3.addWidget(self.vHeight)
|
||||
|
||||
@@ -251,6 +251,7 @@ class _CommandWall:
|
||||
|
||||
def taskbox(self):
|
||||
"sets up a taskbox widget"
|
||||
d = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Units").GetInt("Decimals",2)
|
||||
w = QtGui.QWidget()
|
||||
w.setWindowTitle(str(translate("Arch","Wall options")))
|
||||
lay0 = QtGui.QVBoxLayout(w)
|
||||
@@ -260,7 +261,7 @@ class _CommandWall:
|
||||
label5 = QtGui.QLabel(str(translate("Arch","Length")))
|
||||
lay5.addWidget(label5)
|
||||
self.Length = QtGui.QDoubleSpinBox()
|
||||
self.Length.setDecimals(2)
|
||||
self.Length.setDecimals(d)
|
||||
self.Length.setValue(0.00)
|
||||
lay5.addWidget(self.Length)
|
||||
|
||||
@@ -269,7 +270,7 @@ class _CommandWall:
|
||||
label1 = QtGui.QLabel(str(translate("Arch","Width")))
|
||||
lay1.addWidget(label1)
|
||||
value1 = QtGui.QDoubleSpinBox()
|
||||
value1.setDecimals(2)
|
||||
value1.setDecimals(d)
|
||||
value1.setValue(self.Width)
|
||||
lay1.addWidget(value1)
|
||||
|
||||
@@ -278,7 +279,7 @@ class _CommandWall:
|
||||
label2 = QtGui.QLabel(str(translate("Arch","Height")))
|
||||
lay2.addWidget(label2)
|
||||
value2 = QtGui.QDoubleSpinBox()
|
||||
value2.setDecimals(2)
|
||||
value2.setDecimals(d)
|
||||
value2.setValue(self.Height)
|
||||
lay2.addWidget(value2)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user