fixed a crash on escape from Image Scaling WB
This commit is contained in:
@@ -155,6 +155,7 @@ void CmdCreateImagePlane::activated(int iMsg)
|
||||
doCommand(Doc,"App.activeDocument().%s.YSize = %d",FeatName.c_str(),nHeight);
|
||||
doCommand(Doc,"App.activeDocument().%s.Placement = App.Placement(App.Vector(%f,%f,%f),App.Rotation(%f,%f,%f,%f))"
|
||||
,FeatName.c_str(),p.x,p.y,p.z,r[0],r[1],r[2],r[3]);
|
||||
doCommand(Doc,"Gui.SendMsgToActiveView('ViewFit')");
|
||||
commitCommand();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -149,6 +149,7 @@ def cmdCreateImageScaling(name):
|
||||
self.tracker.off()
|
||||
self.tracker.finalize()
|
||||
self.dialog.hide()
|
||||
FreeCADGui.SendMsgToActiveView("ViewFit")
|
||||
except (ValueError, ZeroDivisionError):
|
||||
self.label1.setText(_translate("Dialog", "<font color='red'>Enter distance</font>", None))
|
||||
return
|
||||
@@ -157,9 +158,10 @@ def cmdCreateImageScaling(name):
|
||||
return
|
||||
|
||||
def reject(self):
|
||||
if len(self.stack) != 2:
|
||||
self.view.removeEventCallbackPivy(pvy.SoMouseButtonEvent.getClassTypeId(),self.callback)
|
||||
self.view.removeEventCallbackPivy(pvy.SoLocation2Event.getClassTypeId(),self.callmouse)
|
||||
self.stack=[]
|
||||
self.view.removeEventCallbackPivy(pvy.SoMouseButtonEvent.getClassTypeId(),self.callback)
|
||||
self.view.removeEventCallbackPivy(pvy.SoLocation2Event.getClassTypeId(),self.callmouse)
|
||||
self.tracker.off()
|
||||
self.tracker.finalize()
|
||||
self.dialog.hide()
|
||||
|
||||
Reference in New Issue
Block a user