LegendItem: fix clear() not closing widgets
This commit is contained in:
parent
8fce6c6ad8
commit
78d11f8a71
@ -189,7 +189,9 @@ class LegendItem(GraphicsWidget, GraphicsWidgetAnchor):
|
|||||||
"""Remove all items from the legend."""
|
"""Remove all items from the legend."""
|
||||||
for sample, label in self.items:
|
for sample, label in self.items:
|
||||||
self.layout.removeItem(sample)
|
self.layout.removeItem(sample)
|
||||||
|
sample.close()
|
||||||
self.layout.removeItem(label)
|
self.layout.removeItem(label)
|
||||||
|
label.close()
|
||||||
|
|
||||||
self.items = []
|
self.items = []
|
||||||
self.updateSize()
|
self.updateSize()
|
||||||
|
Loading…
Reference in New Issue
Block a user