Merge pull request #1272 from maxkl/develop
LegendItem: fix clear() not closing widgets
This commit is contained in:
commit
fd0bbeb9db
@ -233,7 +233,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