Skip to content

Commit 0c15cf6

Browse files
Merge pull request #98 from igortg/fix-legend-stick
Fix legend still being visible after removed
2 parents 43c363c + 28709e8 commit 0c15cf6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

qwt/plot.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1553,6 +1553,7 @@ def insertLegend(self, legend, pos=None, ratio=-1):
15531553
self.__data.layout.setLegendPosition(pos, ratio)
15541554
if legend != self.__data.legend:
15551555
if self.__data.legend and self.__data.legend.parent() is self:
1556+
self.__data.legend.setParent(None)
15561557
del self.__data.legend
15571558
self.__data.legend = legend
15581559
if self.__data.legend:

0 commit comments

Comments
 (0)