BIM: Change SectionPlane task panel button from OK to Close

This commit is contained in:
Furgo
2025-09-09 23:30:46 +02:00
committed by Yorik van Havre
parent 94d893bbe6
commit 673f6664bd

View File

@@ -1256,7 +1256,7 @@ class SectionPlaneTaskPanel:
return True
def getStandardButtons(self):
return QtGui.QDialogButtonBox.Ok
return QtGui.QDialogButtonBox.Close
def getIcon(self,obj):
if hasattr(obj.ViewObject,"Proxy"):
@@ -1358,6 +1358,11 @@ class SectionPlaneTaskPanel:
FreeCADGui.ActiveDocument.resetEdit()
return True
def reject(self):
FreeCAD.ActiveDocument.recompute()
FreeCADGui.ActiveDocument.resetEdit()
return True
def toggleCutView(self, state):
if self.obj and self.obj.ViewObject and hasattr(self.obj.ViewObject, "CutView"):
self.obj.ViewObject.CutView = (state == QtCore.Qt.Checked)