Draft: small fix in Draft.py

This commit is contained in:
Yorik van Havre 2014-12-12 14:38:07 -02:00
parent 7801fbef3a
commit 94187a6872

View File

@ -227,12 +227,14 @@ def getObjectsOfType(objectslist,typ):
def get3DView():
"get3DView(): returns the current view if it is 3D, or the first 3D view found, or None"
v = FreeCADGui.ActiveDocument.ActiveView
if str(type(v)) == "<type 'View3DInventorPy'>":
return v
v = FreeCADGui.ActiveDocument.mdiViewsOfType("Gui::View3DInventor")
if v:
return v[0]
if FreeCAD.GuiUp:
import FreeCADGui
v = FreeCADGui.ActiveDocument.ActiveView
if str(type(v)) == "<type 'View3DInventorPy'>":
return v
v = FreeCADGui.ActiveDocument.mdiViewsOfType("Gui::View3DInventor")
if v:
return v[0]
return None
def isClone(obj,objtype):