Arch/Draft: Fixed bugs in non-GUI mode
This commit is contained in:
@@ -629,23 +629,26 @@ class Component:
|
||||
def hideSubobjects(self,obj,prop):
|
||||
|
||||
"Hides subobjects when a subobject lists change"
|
||||
if prop in ["Additions","Subtractions"]:
|
||||
if hasattr(obj,prop):
|
||||
for o in getattr(obj,prop):
|
||||
if (Draft.getType(o) != "Window") and (not Draft.isClone(o,"Window",True)):
|
||||
if (Draft.getType(obj) == "Wall"):
|
||||
if (Draft.getType(o) == "Roof"):
|
||||
continue
|
||||
|
||||
if FreeCAD.GuiUp:
|
||||
if prop in ["Additions","Subtractions"]:
|
||||
if hasattr(obj,prop):
|
||||
for o in getattr(obj,prop):
|
||||
if (Draft.getType(o) != "Window") and (not Draft.isClone(o,"Window",True)):
|
||||
if (Draft.getType(obj) == "Wall"):
|
||||
if (Draft.getType(o) == "Roof"):
|
||||
continue
|
||||
o.ViewObject.hide()
|
||||
elif prop in ["Mesh"]:
|
||||
if hasattr(obj,prop):
|
||||
o = getattr(obj,prop)
|
||||
if o:
|
||||
o.ViewObject.hide()
|
||||
elif prop in ["Mesh"]:
|
||||
if hasattr(obj,prop):
|
||||
o = getattr(obj,prop)
|
||||
if o:
|
||||
o.ViewObject.hide()
|
||||
|
||||
def processSubShapes(self,obj,base,placement=None):
|
||||
|
||||
"Adds additions and subtractions to a base shape"
|
||||
|
||||
import Draft,Part
|
||||
#print("Processing subshapes of ",obj.Label, " : ",obj.Additions)
|
||||
|
||||
|
||||
@@ -47,11 +47,11 @@ __url__ = "http://www.freecadweb.org"
|
||||
|
||||
'''The Draft module offers a range of tools to create and manipulate basic 2D objects'''
|
||||
|
||||
import FreeCAD, math, sys, os, DraftVecUtils, Draft_rc, WorkingPlane
|
||||
import FreeCAD, math, sys, os, DraftVecUtils, WorkingPlane
|
||||
from FreeCAD import Vector
|
||||
|
||||
if FreeCAD.GuiUp:
|
||||
import FreeCADGui
|
||||
import FreeCADGui, Draft_rc
|
||||
from PySide import QtCore
|
||||
from PySide.QtCore import QT_TRANSLATE_NOOP
|
||||
gui = True
|
||||
|
||||
Reference in New Issue
Block a user