From e89d98ead149bf241e9733a17ab3a5e336d2a121 Mon Sep 17 00:00:00 2001
From: Bob Zeleznik <zzzman@gmail.com>
Date: Mon, 18 Mar 2019 22:13:52 -0400
Subject: cleanup

---
 src/client/views/collections/CollectionDockingView.tsx | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

(limited to 'src/client/views/collections/CollectionDockingView.tsx')

diff --git a/src/client/views/collections/CollectionDockingView.tsx b/src/client/views/collections/CollectionDockingView.tsx
index 2a29e5cb4..5e2f67ca5 100644
--- a/src/client/views/collections/CollectionDockingView.tsx
+++ b/src/client/views/collections/CollectionDockingView.tsx
@@ -37,6 +37,7 @@ export class CollectionDockingView extends React.Component<SubCollectionViewProp
     private _containerRef = React.createRef<HTMLDivElement>();
     private _fullScreen: any = null;
     private _flush: boolean = false;
+    private _ignoreStateChange = "";
 
     constructor(props: SubCollectionViewProps) {
         super(props);
@@ -105,20 +106,17 @@ export class CollectionDockingView extends React.Component<SubCollectionViewProp
         newContentItem.callDownwards('_$init');
         this._goldenLayout.root.callDownwards('setSize', [this._goldenLayout.width, this._goldenLayout.height]);
         this._goldenLayout.emit('stateChanged');
-        this.ignoreStateChange = JSON.stringify(this._goldenLayout.toConfig());
+        this._ignoreStateChange = JSON.stringify(this._goldenLayout.toConfig());
         this.stateChanged();
 
         return newContentItem;
     }
 
-    ignoreStateChange = "";
     setupGoldenLayout() {
         var config = this.props.Document.GetText(KeyStore.Data, "");
-        if (config) {
-            if (this.ignoreStateChange == config) {
-                this.ignoreStateChange = "";
-                return;
-            }
+        var ignore = this._ignoreStateChange;
+        this._ignoreStateChange = "";
+        if (config && ignore != config) {
             if (!this._goldenLayout) {
                 this._goldenLayout = new GoldenLayout(JSON.parse(config));
             }
-- 
cgit v1.2.3-70-g09d2

