From ebae484b8fa87292c9ad7c6382e56708aca62eae Mon Sep 17 00:00:00 2001 From: Gahl Levy <75269480+gahl-levy@users.noreply.github.com> Date: Thu, 17 Dec 2020 13:01:36 -0800 Subject: [PATCH] Fix duplicate settings tabs (#343) Co-authored-by: Steve Faulkner --- src/Contracts/ViewModels.ts | 2 +- src/Explorer/Tabs/TabsManager.html | 2 +- src/Explorer/Tree/Collection.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Contracts/ViewModels.ts b/src/Contracts/ViewModels.ts index a023f2fc4..c98243586 100644 --- a/src/Contracts/ViewModels.ts +++ b/src/Contracts/ViewModels.ts @@ -362,7 +362,7 @@ export enum CollectionTabKind { Gallery = 17, NotebookViewer = 18, Schema = 19, - SettingsV2 = 19 + SettingsV2 = 20 } export enum TerminalKind { diff --git a/src/Explorer/Tabs/TabsManager.html b/src/Explorer/Tabs/TabsManager.html index 12ff5fcf0..7372fd61e 100644 --- a/src/Explorer/Tabs/TabsManager.html +++ b/src/Explorer/Tabs/TabsManager.html @@ -142,7 +142,7 @@ - + diff --git a/src/Explorer/Tree/Collection.ts b/src/Explorer/Tree/Collection.ts index 57a6d97ec..0cc27d48d 100644 --- a/src/Explorer/Tree/Collection.ts +++ b/src/Explorer/Tree/Collection.ts @@ -551,7 +551,7 @@ export default class Collection implements ViewModels.Collection { const tabTitle = !this.offer() ? "Settings" : "Scale & Settings"; const pendingNotificationsPromise: Q.Promise = this._getPendingThroughputSplitNotification(); - const matchingTabs = this.container.tabsManager.getTabs(ViewModels.CollectionTabKind.Settings, tab => { + const matchingTabs = this.container.tabsManager.getTabs(ViewModels.CollectionTabKind.SettingsV2, tab => { return tab.collection && tab.collection.databaseId === this.databaseId && tab.collection.id() === this.id(); });