Draft and BIM: Layer manager did not accept zero transparency

This commit is contained in:
Roy-043
2025-01-10 22:29:03 +01:00
parent 73f0e165be
commit 27ac5c4277
2 changed files with 10 additions and 12 deletions

View File

@@ -269,12 +269,11 @@ class BIM_Layers:
# transparency
transparency = self.model.item(row, 6).data(QtCore.Qt.DisplayRole)
if transparency:
if obj.ViewObject.Transparency != transparency:
if not changed:
FreeCAD.ActiveDocument.openTransaction("Layers change")
changed = True
obj.ViewObject.Transparency = transparency
if obj.ViewObject.Transparency != transparency:
if not changed:
FreeCAD.ActiveDocument.openTransaction("Layers change")
changed = True
obj.ViewObject.Transparency = transparency
# line print color
color = self.model.item(row, 7).data(QtCore.Qt.UserRole)

View File

@@ -235,12 +235,11 @@ class LayerManager:
# transparency
transparency = self.model.item(row,6).data(QtCore.Qt.DisplayRole)
if transparency:
if vobj.Transparency != transparency:
if not changed:
doc.openTransaction("Layers change")
changed = True
vobj.Transparency = transparency
if vobj.Transparency != transparency:
if not changed:
doc.openTransaction("Layers change")
changed = True
vobj.Transparency = transparency
# line print color
color = self.model.item(row,7).data(QtCore.Qt.UserRole)