Remove leftover debug output and use named parameters.
This commit is contained in:
parent
fe1d67fd65
commit
ec4ed868b6
|
@ -2175,9 +2175,7 @@ def makeDrawingView(obj,page,lwmod=None,tmod=None,otherProjection=None):
|
||||||
_DrawingView(viewobj)
|
_DrawingView(viewobj)
|
||||||
page.addObject(viewobj)
|
page.addObject(viewobj)
|
||||||
if (otherProjection):
|
if (otherProjection):
|
||||||
FreeCAD.Console.PrintWarning("using otherProjection")
|
|
||||||
if hasattr(otherProjection,"Scale"):
|
if hasattr(otherProjection,"Scale"):
|
||||||
FreeCAD.Console.PrintWarning(otherProjection.Scale)
|
|
||||||
viewobj.Scale = otherProjection.Scale
|
viewobj.Scale = otherProjection.Scale
|
||||||
if hasattr(otherProjection,"X"):
|
if hasattr(otherProjection,"X"):
|
||||||
viewobj.X = otherProjection.X
|
viewobj.X = otherProjection.X
|
||||||
|
@ -2186,7 +2184,6 @@ def makeDrawingView(obj,page,lwmod=None,tmod=None,otherProjection=None):
|
||||||
if hasattr(otherProjection,"Rotation"):
|
if hasattr(otherProjection,"Rotation"):
|
||||||
viewobj.Rotation = otherProjection.Rotation
|
viewobj.Rotation = otherProjection.Rotation
|
||||||
if hasattr(otherProjection,"Direction"):
|
if hasattr(otherProjection,"Direction"):
|
||||||
FreeCAD.Console.PrintWarning(otherProjection.Direction)
|
|
||||||
viewobj.Direction = otherProjection.Direction
|
viewobj.Direction = otherProjection.Direction
|
||||||
else:
|
else:
|
||||||
if hasattr(page.ViewObject,"HintScale"):
|
if hasattr(page.ViewObject,"HintScale"):
|
||||||
|
|
|
@ -3152,10 +3152,8 @@ class Drawing(Modifier):
|
||||||
self.page = self.createDefaultPage()
|
self.page = self.createDefaultPage()
|
||||||
otherProjection = None
|
otherProjection = None
|
||||||
for obj in sel:
|
for obj in sel:
|
||||||
FreeCAD.Console.PrintWarning(obj)
|
|
||||||
if obj.isDerivedFrom("Drawing::FeatureView"):
|
if obj.isDerivedFrom("Drawing::FeatureView"):
|
||||||
otherProjection = obj
|
otherProjection = obj
|
||||||
FreeCAD.Console.PrintWarning(otherProjection)
|
|
||||||
sel.reverse()
|
sel.reverse()
|
||||||
for obj in sel:
|
for obj in sel:
|
||||||
if obj.ViewObject.isVisible():
|
if obj.ViewObject.isVisible():
|
||||||
|
@ -3164,7 +3162,7 @@ class Drawing(Modifier):
|
||||||
#oldobj = self.page.getObject(name)
|
#oldobj = self.page.getObject(name)
|
||||||
#if oldobj:
|
#if oldobj:
|
||||||
# self.doc.removeObject(oldobj.Name)
|
# self.doc.removeObject(oldobj.Name)
|
||||||
Draft.makeDrawingView(obj,self.page,None,None,otherProjection)
|
Draft.makeDrawingView(obj,self.page,otherProjection=otherProjection)
|
||||||
self.doc.recompute()
|
self.doc.recompute()
|
||||||
|
|
||||||
def createDefaultPage(self):
|
def createDefaultPage(self):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user