Draft: replaced the Draft OK task button with a more clear 'Create Point' button.
This commit is contained in:
parent
7ff4e28599
commit
45f059d3a9
|
@ -201,7 +201,7 @@ class DraftTaskPanel:
|
|||
else:
|
||||
self.form = widget
|
||||
def getStandardButtons(self):
|
||||
return int(QtGui.QDialogButtonBox.Ok) | int(QtGui.QDialogButtonBox.Close)
|
||||
return int(QtGui.QDialogButtonBox.Close)
|
||||
def accept(self):
|
||||
if hasattr(FreeCADGui,"draftToolBar"):
|
||||
return FreeCADGui.draftToolBar.validatePoint()
|
||||
|
@ -384,9 +384,11 @@ class DraftToolBar:
|
|||
xl = QtGui.QHBoxLayout()
|
||||
yl = QtGui.QHBoxLayout()
|
||||
zl = QtGui.QHBoxLayout()
|
||||
bl = QtGui.QHBoxLayout()
|
||||
self.layout.addLayout(xl)
|
||||
self.layout.addLayout(yl)
|
||||
self.layout.addLayout(zl)
|
||||
self.layout.addLayout(bl)
|
||||
self.labelx = self._label("labelx", xl)
|
||||
self.xValue = self._inputfield("xValue", xl) #width=60
|
||||
self.xValue.setText(self.FORMAT % 0)
|
||||
|
@ -396,6 +398,7 @@ class DraftToolBar:
|
|||
self.labelz = self._label("labelz", zl)
|
||||
self.zValue = self._inputfield("zValue", zl)
|
||||
self.zValue.setText(self.FORMAT % 0)
|
||||
self.pointButton = self._pushbutton("addButton", bl, icon="Draft_AddPoint", width=100)
|
||||
|
||||
# text
|
||||
|
||||
|
@ -491,6 +494,7 @@ class DraftToolBar:
|
|||
QtCore.QObject.connect(self.zValue,QtCore.SIGNAL("textEdited(QString)"),self.checkSpecialChars)
|
||||
QtCore.QObject.connect(self.radiusValue,QtCore.SIGNAL("textEdited(QString)"),self.checkSpecialChars)
|
||||
QtCore.QObject.connect(self.zValue,QtCore.SIGNAL("returnPressed()"),self.validatePoint)
|
||||
QtCore.QObject.connect(self.pointButton,QtCore.SIGNAL("clicked()"),self.validatePoint)
|
||||
QtCore.QObject.connect(self.radiusValue,QtCore.SIGNAL("returnPressed()"),self.validatePoint)
|
||||
QtCore.QObject.connect(self.angleValue,QtCore.SIGNAL("returnPressed()"),self.validatePoint)
|
||||
QtCore.QObject.connect(self.textValue,QtCore.SIGNAL("textChanged(QString)"),self.storeCurrentText)
|
||||
|
@ -613,6 +617,8 @@ class DraftToolBar:
|
|||
self.labelz.setText(translate("draft", "Z"))
|
||||
self.yValue.setToolTip(translate("draft", "Y coordinate of next point"))
|
||||
self.zValue.setToolTip(translate("draft", "Z coordinate of next point"))
|
||||
self.pointButton.setText(translate("draft", "Enter point"))
|
||||
self.pointButton.setToolTip(translate("draft", "Enter a new point with the given coordinates"))
|
||||
self.labellength.setText(translate("draft", "Length"))
|
||||
self.labelangle.setText(translate("draft", "Angle"))
|
||||
self.lengthValue.setToolTip(translate("draft", "Length of current segment"))
|
||||
|
@ -765,6 +771,7 @@ class DraftToolBar:
|
|||
self.xValue.hide()
|
||||
self.yValue.hide()
|
||||
self.zValue.hide()
|
||||
self.pointButton.hide()
|
||||
self.lengthValue.hide()
|
||||
self.angleValue.hide()
|
||||
self.angleLock.hide()
|
||||
|
@ -820,6 +827,7 @@ class DraftToolBar:
|
|||
self.xValue.show()
|
||||
self.yValue.show()
|
||||
self.zValue.show()
|
||||
self.pointButton.show()
|
||||
if rel: self.isRelative.show()
|
||||
self.xValue.setFocus()
|
||||
self.xValue.selectAll()
|
||||
|
|
Loading…
Reference in New Issue
Block a user