diff --git a/SQLTools.py b/SQLTools.py index 1d28050..72b75b5 100644 --- a/SQLTools.py +++ b/SQLTools.py @@ -345,9 +345,6 @@ def createConnection(connectionName, config, settings, callback=None): settingsConnection = config.get('cli_options', {}) Utils.merge({'cli_options':settingsConnection}, settings) ST.conn = Connection(connectionName, config, settings=settings) - views = Window().views() - for view in views: - view.set_status('db', 'db: ' + connectionName + ' ') except FileNotFoundError as e: # use only first line of the Exception in status message Window().status_message(__package__ + ": " + str(e).splitlines()[0]) @@ -397,6 +394,10 @@ def loadConnectionData(callback=None): if not ST.conn: return + views = Window().views() + for view in views: + view.set_status('db', 'db: ' + ST.conn.name + ' ') + def afterAllDataHasLoaded(): ST.completion = Completion(ST.tables, ST.columns, ST.functions, settings=settingsStore) logger.info('completions loaded')