Hiding all/most properties that are supposed to be hidden on document restore again.

This commit is contained in:
markus
2018-08-22 13:54:13 -07:00
committed by wmayer
parent f094ae4135
commit 7c048482bf
13 changed files with 62 additions and 13 deletions

View File

@@ -79,7 +79,12 @@ def shapeBoundBox(obj):
PathLog.error(translate('PathStock', "Invalid base object %s - no shape found") % obj.Name)
return None
class StockFromBase:
class Stock(object):
def onDocumentRestored(self, obj):
if hasattr(obj, 'StockType'):
obj.setEditorMode('StockType', 2) # hide
class StockFromBase(Stock):
def __init__(self, obj, base):
"Make stock"
@@ -130,7 +135,7 @@ class StockFromBase:
self.execute(obj)
class StockCreateBox:
class StockCreateBox(Stock):
MinExtent = 0.001
def __init__(self, obj):
@@ -165,7 +170,7 @@ class StockCreateBox:
if prop in ['Length', 'Width', 'Height'] and not 'Restore' in obj.State:
self.execute(obj)
class StockCreateCylinder:
class StockCreateCylinder(Stock):
MinExtent = 0.001
def __init__(self, obj):