Merge pull request #1272 from maxkl/develop

LegendItem: fix clear() not closing widgets
This commit is contained in:
Ogi Moore 2020-06-23 21:04:35 -07:00 committed by GitHub
commit fd0bbeb9db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -233,7 +233,9 @@ class LegendItem(GraphicsWidget, GraphicsWidgetAnchor):
"""Remove all items from the legend."""
for sample, label in self.items:
self.layout.removeItem(sample)
sample.close()
self.layout.removeItem(label)
label.close()
self.items = []
self.updateSize()