Skip to content

Commit 00c20ab

Browse files
committed
Fix: replace old setIcon method by the new set_icon_name method
1 parent 11724b0 commit 00c20ab

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

plotpy/tools/cross_section.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def create_shape(self) -> AnnotatedObliqueRectangle:
121121
"""Create shape for the tool"""
122122
annotation = AnnotatedObliqueRectangle(0, 0, 1, 0, 1, 1, 0, 1)
123123
self.set_shape_style(annotation)
124-
annotation.setIcon(get_icon(self.ICON))
124+
annotation.set_icon_name(self.ICON)
125125
return annotation, 0, 2
126126

127127

plotpy/tools/image.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1091,9 +1091,9 @@ def activate_command(self, plot: BasePlot, checked: bool) -> None:
10911091
for item in itemlist:
10921092
item.set_locked(checked)
10931093
if item.is_locked():
1094-
item.setIcon(get_icon("trimage_lock.png"))
1094+
item.set_icon_name("trimage_lock.png")
10951095
else:
1096-
item.setIcon(get_icon("image.png"))
1096+
item.set_icon_name("image.png")
10971097
plot.SIG_ITEM_PARAMETERS_CHANGED.emit(item)
10981098
plot.SIG_ITEMS_CHANGED.emit(plot)
10991099

0 commit comments

Comments
 (0)