Skip to content

Commit d5d5f1e

Browse files
committed
Fix - reset layout only if was changed
1 parent 7c2c826 commit d5d5f1e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

scripts/JSRootPainter.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1242,12 +1242,14 @@
12421242

12431243
var origin = this.select_main('origin');
12441244
if (!origin.empty() && !keep_origin) origin.html("");
1245-
this.set_layout_kind('simple');
1245+
if (this._changed_layout)
1246+
this.set_layout_kind('simple');
12461247
this.AccessTopPainter(false);
12471248
this.divid = null;
12481249

12491250
if (this._hpainter && typeof this._hpainter.ClearPainter === 'function') this._hpainter.ClearPainter(this);
12501251

1252+
delete this._changed_layout;
12511253
delete this._hitemname;
12521254
delete this._hdrawopt;
12531255
delete this._hpainter;
@@ -1342,6 +1344,7 @@
13421344
if (!kind) kind = 'simple';
13431345
origin.property('layout', kind);
13441346
origin.property('layout_selector', (kind!='simple') && main_selector ? main_selector : null);
1347+
this._changed_layout = (kind !== 'simple'); // use in cleanup
13451348
}
13461349
}
13471350

0 commit comments

Comments
 (0)