Skip to content

Commit

Permalink
Draft and BIM: Layer manager did not accept zero transparency
Browse files Browse the repository at this point in the history
  • Loading branch information
Roy-043 committed Jan 10, 2025
1 parent 73f0e16 commit 27ac5c4
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 27ac5c4

Please sign in to comment.