Draft: remove superfluous code from gui_points.py (#10379)

This commit is contained in:
Roy-043
2023-08-27 12:41:01 +02:00
committed by GitHub
parent c9975f39f8
commit e9294f2dbb

View File

@@ -64,15 +64,8 @@ class Point(gui_base_original.Creator):
def Activated(self):
"""Execute when the command is called."""
super(Point, self).Activated(name="Point")
self.view = gui_utils.get3DView()
super().Activated(name="Point")
self.stack = []
rot = self.view.getCameraNode().getField("orientation").getValue()
upv = App.Vector(rot.multVec(coin.SbVec3f(0, 1, 0)).getValue())
App.DraftWorkingPlane.setup(self.view.getViewDirection().negative(),
App.Vector(0, 0, 0),
upv)
self.point = None
if self.ui:
self.ui.pointUi(title=translate("draft", self.featureName), icon="Draft_Point")
self.ui.isRelative.hide()
@@ -159,7 +152,7 @@ class Point(gui_base_original.Creator):
Restart (continue) the command if `True`, or if `None` and
`ui.continueMode` is `True`.
"""
super(Point, self).finish()
super().finish()
if self.callbackClick:
self.view.removeEventCallbackPivy(coin.SoMouseButtonEvent.getClassTypeId(), self.callbackClick)
if self.callbackMove: