Small GUI adjustments in Draft

This commit is contained in:
Yorik van Havre 2012-05-23 18:03:25 -03:00
parent c1f8018a12
commit 555c7ca516
2 changed files with 18 additions and 2 deletions

View File

@ -523,6 +523,17 @@ class DraftToolBar:
self.xValue.setEnabled(True) self.xValue.setEnabled(True)
self.yValue.setEnabled(True) self.yValue.setEnabled(True)
self.isRelative.show() self.isRelative.show()
self.undoButton.show()
self.continueCmd.show()
def wireUi(self,title=None):
if title:
self.pointUi(title)
else:
self.pointUi(translate("draft", "DWire"))
self.xValue.setEnabled(True)
self.yValue.setEnabled(True)
self.isRelative.show()
self.hasFill.show() self.hasFill.show()
self.finishButton.show() self.finishButton.show()
self.closeButton.show() self.closeButton.show()
@ -935,6 +946,8 @@ class DraftToolBar:
if self.finishButton.isVisible(): if self.finishButton.isVisible():
self.finish() self.finish()
spec = True spec = True
elif txt.endsWith("t"):
self.continueCmd.setChecked(not self.continueCmd.isChecked())
elif txt.endsWith("w"): elif txt.endsWith("w"):
self.wipeLine() self.wipeLine()
elif txt.endsWith("s"): elif txt.endsWith("s"):

View File

@ -400,7 +400,10 @@ class Line(Creator):
Creator.Activated(self,name) Creator.Activated(self,name)
if self.doc: if self.doc:
self.obj = None self.obj = None
self.ui.lineUi(name) if self.isWire:
self.ui.wireUi(name)
else:
self.ui.lineUi(name)
self.linetrack = lineTracker() self.linetrack = lineTracker()
self.constraintrack = lineTracker(dotted=True) self.constraintrack = lineTracker(dotted=True)
self.obj=self.doc.addObject("Part::Feature",self.featureName) self.obj=self.doc.addObject("Part::Feature",self.featureName)