Fix duplicated groups appearing at outliner bottom

This commit is contained in:
JannisX11 2023-05-06 23:41:16 +02:00
parent e65faa4ffa
commit 15ba9dc866
2 changed files with 1 additions and 5 deletions

View File

@ -58,9 +58,6 @@ class Group extends OutlinerNode {
init() {
super.init();
Project.groups.push(this);
if (typeof this.parent !== 'object') {
this.addTo();
}
if (!this.mesh || !this.mesh.parent) {
this.constructor.preview_controller.setup(this);
}

View File

@ -115,9 +115,8 @@ class OutlinerNode {
return this.constructor.preview_controller;
}
//Sorting
sortInBefore(element, index_mod) {
sortInBefore(element, index_mod = 0) {
var index = -1;
index_mod = index_mod || 0;
if (element.parent === 'root') {
index = Outliner.root.indexOf(element)