mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 22:42:25 -04:00
work around crash on close when card layout opened on windows (#940)
This commit is contained in:
parent
988fc102d8
commit
36e877fe12
1 changed files with 8 additions and 1 deletions
|
@ -417,9 +417,16 @@ class Editor(object):
|
||||||
ord = self.card.ord
|
ord = self.card.ord
|
||||||
else:
|
else:
|
||||||
ord = 0
|
ord = 0
|
||||||
CardLayout(self.mw, self.note, ord=ord, parent=self.parentWindow,
|
# passing parentWindow leads to crash on windows at the moment
|
||||||
|
if isWin:
|
||||||
|
parent=None
|
||||||
|
else:
|
||||||
|
parent=self.parentWindow
|
||||||
|
CardLayout(self.mw, self.note, ord=ord, parent=parent,
|
||||||
addMode=self.addMode)
|
addMode=self.addMode)
|
||||||
self.loadNote()
|
self.loadNote()
|
||||||
|
if isWin:
|
||||||
|
self.parentWindow.activateWindow()
|
||||||
|
|
||||||
# JS->Python bridge
|
# JS->Python bridge
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
Loading…
Reference in a new issue