Skip to content

Commit

Permalink
Merge pull request #6596 from markotoplak/fix-crash-preproc
Browse files Browse the repository at this point in the history
owpreprocess: fix potential crash at destruction
  • Loading branch information
markotoplak committed Nov 3, 2023
2 parents 1ab70b6 + 82f00d9 commit 5412e74
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Orange/widgets/data/owpreprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -1178,6 +1178,10 @@ def sizeHint(self):

gui.auto_apply(self.buttonsArea, self, "autocommit")

self.__update_size_constraint_timer = QTimer(
self, singleShot=True, interval=0,
)
self.__update_size_constraint_timer.timeout.connect(self.__update_size_constraint)
self._initialize()

def _initialize(self):
Expand Down Expand Up @@ -1367,8 +1371,7 @@ def customEvent(self, event):

def eventFilter(self, receiver, event):
if receiver is self.flow_view and event.type() == QEvent.LayoutRequest:
QTimer.singleShot(0, self.__update_size_constraint)

self.__update_size_constraint_timer.start()
return super().eventFilter(receiver, event)

def storeSpecificSettings(self):
Expand Down

0 comments on commit 5412e74

Please sign in to comment.