From f887b8b64a258dc3653c074ebdffab10235d19ae Mon Sep 17 00:00:00 2001 From: Tamas Lustyik Date: Sun, 29 Jul 2018 22:32:30 +0200 Subject: [PATCH] Fixed opening infinite browser windows --- Ilion/Ilion.swift | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Ilion/Ilion.swift b/Ilion/Ilion.swift index a86476a..3e3533d 100644 --- a/Ilion/Ilion.swift +++ b/Ilion/Ilion.swift @@ -32,11 +32,14 @@ public protocol IlionDelegate: class { } @objc public func start() { - browserWindowController = BrowserWindowController() - browserWindowController?.delegate = self - browserWindowController?.window?.makeKeyAndOrderFront(self) + if browserWindowController == nil { + browserWindowController = BrowserWindowController() + browserWindowController?.delegate = self + _ = browserWindowController?.window + browserWindowController?.configure(with: StringsManager.defaultManager.db) + } - browserWindowController?.configure(with: StringsManager.defaultManager.db) + browserWindowController?.window?.makeKeyAndOrderFront(self) setUpExportFlow() }