Skip to content

Commit

Permalink
Draft: Fixed radius and offset numeric values - fixes #1530
Browse files Browse the repository at this point in the history
  • Loading branch information
yorikvanhavre committed May 3, 2014
1 parent e2650dc commit e0e6f9b
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/Mod/Draft/DraftGui.py
Expand Up @@ -386,6 +386,8 @@ def setupToolBar(self,task=False):
QtCore.QObject.connect(self.xValue,QtCore.SIGNAL("valueChanged(double)"),self.changeXValue)
QtCore.QObject.connect(self.yValue,QtCore.SIGNAL("valueChanged(double)"),self.changeYValue)
QtCore.QObject.connect(self.zValue,QtCore.SIGNAL("valueChanged(double)"),self.changeZValue)
QtCore.QObject.connect(self.radiusValue,QtCore.SIGNAL("valueChanged(double)"),self.changeRadiusValue)
QtCore.QObject.connect(self.offsetValue,QtCore.SIGNAL("valueChanged(double)"),self.changeOffsetValue)
QtCore.QObject.connect(self.xValue,QtCore.SIGNAL("returnPressed()"),self.checkx)
QtCore.QObject.connect(self.yValue,QtCore.SIGNAL("returnPressed()"),self.checky)
QtCore.QObject.connect(self.xValue,QtCore.SIGNAL("textEdited(QString)"),self.checkSpecialChars)
Expand Down Expand Up @@ -1031,14 +1033,16 @@ def validatePoint(self):
if self.sourceCmd or self.pointcallback:
if (self.labelRadius.isVisible()):
try:
rad=float(self.radiusValue.text())
#rad=float(self.radiusValue.text())
rad = self.radius
except ValueError:
pass
else:
self.sourceCmd.numericRadius(rad)
elif (self.offsetLabel.isVisible()):
try:
offset=float(self.offsetValue.text())
#offset=float(self.offsetValue.text())
offset = self.offset
except ValueError:
pass
else:
Expand Down Expand Up @@ -1517,6 +1521,12 @@ def changeYValue(self,d):
def changeZValue(self,d):
self.z = d

def changeRadiusValue(self,d):
self.radius = d

def changeOffsetValue(self,d):
self.offset = d

#---------------------------------------------------------------------------
# TaskView operations
#---------------------------------------------------------------------------
Expand Down

0 comments on commit e0e6f9b

Please sign in to comment.