From 5ab511e17ab3a8ed765f59ecf0213f4cf71254c7 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sat, 26 May 2012 22:49:35 +0900 Subject: [PATCH] treat edit current as separate window on osx --- aqt/editcurrent.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/aqt/editcurrent.py b/aqt/editcurrent.py index 91d44288a..0ffb93657 100644 --- a/aqt/editcurrent.py +++ b/aqt/editcurrent.py @@ -6,11 +6,17 @@ from aqt.qt import * import aqt.editor from aqt.utils import saveGeom, restoreGeom from anki.hooks import addHook, remHook +from anki.utils import isMac class EditCurrent(QDialog): def __init__(self, mw): - QDialog.__init__(self, mw) + if isMac: + # use a separate window on os x so we can a clean menu + QDialog.__init__(self, None, Qt.Window) + else: + QDialog.__init__(self, mw) + QDialog.__init__(self, None, Qt.Window) self.mw = mw self.form = aqt.forms.editcurrent.Ui_Dialog() self.form.setupUi(self)