Skip to content

Commit

Permalink
Merge pull request FreeCAD#18988 from Roy-043/Draft-Bim-Layer-manager…
Browse files Browse the repository at this point in the history
…-transp-zero

Draft and BIM: Layer manager did not accept zero transparency
  • Loading branch information
Roy-043 authored Jan 10, 2025
2 parents 73f0e16 + 27ac5c4 commit 7829fcc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
11 changes: 5 additions & 6 deletions src/Mod/BIM/bimcommands/BimLayers.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,12 +269,11 @@ def accept(self):

# 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)
Expand Down
11 changes: 5 additions & 6 deletions src/Mod/Draft/draftguitools/gui_layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,12 +235,11 @@ def accept(self):

# 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)
Expand Down

0 comments on commit 7829fcc

Please sign in to comment.