Fix issue with plugin panels not initializing

This commit is contained in:
JannisX11 2024-10-26 22:57:08 +02:00
parent 775c2a84e4
commit f670286850

View File

@ -23,6 +23,7 @@ class Panel extends EventSystem {
this.toolbars = []; this.toolbars = [];
if (!Interface.data.panels[this.id]) Interface.data.panels[this.id] = {}; if (!Interface.data.panels[this.id]) Interface.data.panels[this.id] = {};
if (!Interface.getModeData().panels[this.id]) Interface.getModeData().panels[this.id] = {};
this.position_data = Interface.getModeData().panels[this.id]; this.position_data = Interface.getModeData().panels[this.id];
let defaultp = this.default_position = data.default_position || 0; let defaultp = this.default_position = data.default_position || 0;
if (defaultp && defaultp.slot) this.previous_slot = defaultp.slot; if (defaultp && defaultp.slot) this.previous_slot = defaultp.slot;