Merge pull request #18988 from Roy-043/Draft-Bim-Layer-manager-transp-zero

Draft and BIM: Layer manager did not accept zero transparency
This commit is contained in:
Roy-043
2025-01-10 23:40:27 +01:00
committed by GitHub
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)