Fixed double clicking bug in the viewprovider
This commit is contained in:
parent
0a743b27da
commit
3ff550f977
|
@ -69,19 +69,13 @@ class HoleGui:
|
|||
hole = Hole(feature)
|
||||
body.addFeature(feature)
|
||||
|
||||
ViewProviderHole(feature.ViewObject)
|
||||
vp = ViewProviderHole(feature.ViewObject)
|
||||
feature.touch()
|
||||
FreeCAD.ActiveDocument.recompute()
|
||||
# Fit view (remove after the testing phase)
|
||||
FreeCADGui.SendMsgToActiveView("ViewFit")
|
||||
|
||||
panel = TaskHole(feature)
|
||||
|
||||
FreeCADGui.Control.showDialog(panel)
|
||||
if panel.setupUi():
|
||||
FreeCADGui.Control.closeDialog(panel)
|
||||
return None
|
||||
return panel
|
||||
vp.setEdit(vp, 1)
|
||||
|
||||
def GetResources(self):
|
||||
IconPath = FreeCAD.ConfigGet("AppHomePath") + "Mod/PartDesign/FeatureHole/PartDesign_Hole.svg"
|
||||
|
|
|
@ -185,6 +185,7 @@ class TaskHole:
|
|||
|
||||
# Update the UI
|
||||
self.updateUI()
|
||||
return True
|
||||
|
||||
def getRefText(self, ref):
|
||||
(obj, element) = ref
|
||||
|
|
|
@ -63,17 +63,16 @@ class ViewProviderHole:
|
|||
''' Print the name of the property that has changed '''
|
||||
#FreeCAD.Console.PrintMessage("Change property: " + str(prop) + "\n")
|
||||
pass
|
||||
|
||||
|
||||
def setEdit(self,vp,mode):
|
||||
FreeCAD.Console.PrintMessage("setEdit\n")
|
||||
panel = TaskHole(self.Object)
|
||||
|
||||
FreeCADGui.Control.showDialog(panel)
|
||||
if panel.setupUi():
|
||||
if not panel.setupUi():
|
||||
FreeCADGui.Control.closeDialog(panel)
|
||||
return True
|
||||
return False
|
||||
|
||||
return False
|
||||
return True
|
||||
|
||||
def unsetEdit(self,vp,mode):
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue
Block a user