Skip to content

Commit

Permalink
Merge pull request #1412 from ales-erjavec/overlay-fix
Browse files Browse the repository at this point in the history
[FIX] overlay: Auto disconnect when the overlay widget is deleted
  • Loading branch information
kernc authored Jul 7, 2016
2 parents d689844 + 6ec7128 commit 38dfe71
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Orange/widgets/utils/overlay.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
QWidget, QPixmap, QStyleOption, QPainter
)
from PyQt4.QtCore import Qt, QSize, QRect, QPoint, QEvent, QTimer
from PyQt4.QtCore import pyqtSignal as Signal
from PyQt4.QtCore import pyqtSignal as Signal, pyqtSlot as Slot


class OverlayWidget(QWidget):
Expand Down Expand Up @@ -172,6 +172,7 @@ def getsize(hint, minimum, maximum, policy):
geom = QRect(QPoint(x, y), size)
self.setGeometry(geom)

@Slot()
def __on_destroyed(self):
self.__widget = None
if self.isVisible():
Expand Down

0 comments on commit 38dfe71

Please sign in to comment.