Skip file open events in dev mode

This commit is contained in:
Micah Lee 2021-07-02 10:10:01 -07:00
parent ed4586a051
commit 0b1d8f6a3e
No known key found for this signature in database
GPG key ID: 403C2657CD994F73

View file

@ -35,6 +35,8 @@ class ApplicationWrapper(QtCore.QObject):
def monkeypatch_event(event): def monkeypatch_event(event):
# In macOS, handle the file open event # In macOS, handle the file open event
if event.type() == QtCore.QEvent.FileOpen: if event.type() == QtCore.QEvent.FileOpen:
# Skip file open events in dev mode
if not sys.dangerzone_dev:
self.document_selected.emit(event.file()) self.document_selected.emit(event.file())
return True return True
elif event.type() == QtCore.QEvent.ApplicationActivate: elif event.type() == QtCore.QEvent.ApplicationActivate: