From c9ba2e5962eae1afc46daf35e55fb0ea5c3af5a4 Mon Sep 17 00:00:00 2001 From: Fabio Date: Tue, 27 Oct 2020 17:04:39 +0100 Subject: [PATCH] fix: F9 key shortcut refresh all query tabs instead of just selected one --- src/main/libs/clients/MySQLClient.js | 1 - src/renderer/components/WorkspaceQueryTab.vue | 6 ++++-- src/renderer/components/WorkspaceTableTab.vue | 6 ++++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/main/libs/clients/MySQLClient.js b/src/main/libs/clients/MySQLClient.js index 92a30722..0e3ceb54 100644 --- a/src/main/libs/clients/MySQLClient.js +++ b/src/main/libs/clients/MySQLClient.js @@ -372,7 +372,6 @@ export class MySQLClient extends AntaresCore { }; }) : []; - // TODO: move here fields and keys requests if (args.details) { let cachedTable; diff --git a/src/renderer/components/WorkspaceQueryTab.vue b/src/renderer/components/WorkspaceQueryTab.vue index 36be9cdc..45ebc06c 100644 --- a/src/renderer/components/WorkspaceQueryTab.vue +++ b/src/renderer/components/WorkspaceQueryTab.vue @@ -134,8 +134,10 @@ export default { }, onKey (e) { e.stopPropagation(); - if (e.key === 'F9') - this.runQuery(this.query); + if (this.tabUid === this.workspace.selected_tab) { + if (e.key === 'F9') + this.runQuery(this.query); + } } } }; diff --git a/src/renderer/components/WorkspaceTableTab.vue b/src/renderer/components/WorkspaceTableTab.vue index f416a161..916120ff 100644 --- a/src/renderer/components/WorkspaceTableTab.vue +++ b/src/renderer/components/WorkspaceTableTab.vue @@ -187,8 +187,10 @@ export default { }, onKey (e) { e.stopPropagation(); - if (e.key === 'F5') - this.reloadTable(); + if (this.workspace.selected_tab === 'data') { + if (e.key === 'F5') + this.reloadTable(); + } }, setRefreshInterval () { if (this.refreshInterval)