aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client/views/collections/CollectionDockingView.tsx12
1 files changed, 5 insertions, 7 deletions
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));
}