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,13 +523,24 @@ class DraftToolBar:
self.xValue.setEnabled(True)
self.yValue.setEnabled(True)
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.finishButton.show()
self.closeButton.show()
self.wipeButton.show()
self.undoButton.show()
self.continueCmd.show()
def circleUi(self):
self.pointUi(translate("draft", "Circle"))
self.continueCmd.show()
@ -935,6 +946,8 @@ class DraftToolBar:
if self.finishButton.isVisible():
self.finish()
spec = True
elif txt.endsWith("t"):
self.continueCmd.setChecked(not self.continueCmd.isChecked())
elif txt.endsWith("w"):
self.wipeLine()
elif txt.endsWith("s"):

View File

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