Arch: small fixes
This commit is contained in:
parent
5b020cb374
commit
79181ad877
|
@ -36,7 +36,7 @@ __title__="FreeCAD Axis System"
|
||||||
__author__ = "Yorik van Havre"
|
__author__ = "Yorik van Havre"
|
||||||
__url__ = "http://www.freecadweb.org"
|
__url__ = "http://www.freecadweb.org"
|
||||||
|
|
||||||
def makeAxis(num=5,size=1,name=translate("Arch","Axes")):
|
def makeAxis(num=5,size=1000,name=translate("Arch","Axes")):
|
||||||
'''makeAxis(num,size): makes an Axis System
|
'''makeAxis(num,size): makes an Axis System
|
||||||
based on the given number of axes and interval distances'''
|
based on the given number of axes and interval distances'''
|
||||||
obj = FreeCAD.ActiveDocument.addObject("App::FeaturePython",name)
|
obj = FreeCAD.ActiveDocument.addObject("App::FeaturePython",name)
|
||||||
|
@ -300,7 +300,7 @@ class _ViewProviderAxis:
|
||||||
num += 1
|
num += 1
|
||||||
|
|
||||||
|
|
||||||
def setEdit(self,vobj,mode):
|
def setEdit(self,vobj,mode=0):
|
||||||
taskd = _AxisTaskPanel()
|
taskd = _AxisTaskPanel()
|
||||||
taskd.obj = vobj.Object
|
taskd.obj = vobj.Object
|
||||||
taskd.update()
|
taskd.update()
|
||||||
|
@ -311,6 +311,9 @@ class _ViewProviderAxis:
|
||||||
FreeCADGui.Control.closeDialog()
|
FreeCADGui.Control.closeDialog()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
def doubleClicked(self,vobj):
|
||||||
|
self.setEdit(vobj)
|
||||||
|
|
||||||
def __getstate__(self):
|
def __getstate__(self):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
@ -365,7 +368,7 @@ class _AxisTaskPanel:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def getStandardButtons(self):
|
def getStandardButtons(self):
|
||||||
return int(QtGui.QDialogButtonBox.Ok)
|
return int(QtGui.QDialogButtonBox.Close)
|
||||||
|
|
||||||
def update(self):
|
def update(self):
|
||||||
'fills the treewidget'
|
'fills the treewidget'
|
||||||
|
@ -408,9 +411,10 @@ class _AxisTaskPanel:
|
||||||
self.obj.touch()
|
self.obj.touch()
|
||||||
FreeCAD.ActiveDocument.recompute()
|
FreeCAD.ActiveDocument.recompute()
|
||||||
|
|
||||||
def accept(self):
|
def reject(self):
|
||||||
self.resetObject()
|
FreeCAD.ActiveDocument.recompute()
|
||||||
FreeCADGui.ActiveDocument.resetEdit()
|
FreeCADGui.ActiveDocument.resetEdit()
|
||||||
|
return True
|
||||||
|
|
||||||
def retranslateUi(self, TaskPanel):
|
def retranslateUi(self, TaskPanel):
|
||||||
TaskPanel.setWindowTitle(QtGui.QApplication.translate("Arch", "Axes", None, QtGui.QApplication.UnicodeUTF8))
|
TaskPanel.setWindowTitle(QtGui.QApplication.translate("Arch", "Axes", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
|
|
|
@ -781,7 +781,7 @@ class _ViewProviderWindow(ArchComponent.ViewProviderComponent):
|
||||||
if self.Object.Base:
|
if self.Object.Base:
|
||||||
self.Object.Base.ViewObject.hide()
|
self.Object.Base.ViewObject.hide()
|
||||||
FreeCADGui.Control.closeDialog()
|
FreeCADGui.Control.closeDialog()
|
||||||
return False
|
return
|
||||||
|
|
||||||
def colorize(self,obj):
|
def colorize(self,obj):
|
||||||
"setting different part colors"
|
"setting different part colors"
|
||||||
|
@ -915,7 +915,7 @@ class _ArchWindowTaskPanel:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def getStandardButtons(self):
|
def getStandardButtons(self):
|
||||||
return int(QtGui.QDialogButtonBox.Ok)
|
return int(QtGui.QDialogButtonBox.Close)
|
||||||
|
|
||||||
def check(self,wid,col):
|
def check(self,wid,col):
|
||||||
self.editButton.setEnabled(True)
|
self.editButton.setEnabled(True)
|
||||||
|
@ -1083,7 +1083,7 @@ class _ArchWindowTaskPanel:
|
||||||
self.createButton.setVisible(False)
|
self.createButton.setVisible(False)
|
||||||
self.addButton.setEnabled(True)
|
self.addButton.setEnabled(True)
|
||||||
|
|
||||||
def accept(self):
|
def reject(self):
|
||||||
FreeCAD.ActiveDocument.recompute()
|
FreeCAD.ActiveDocument.recompute()
|
||||||
FreeCADGui.ActiveDocument.resetEdit()
|
FreeCADGui.ActiveDocument.resetEdit()
|
||||||
return True
|
return True
|
||||||
|
|
Loading…
Reference in New Issue
Block a user