diff --git a/source/Editor.js b/source/Editor.js index 5b743772d..299c49f70 100644 --- a/source/Editor.js +++ b/source/Editor.js @@ -815,7 +815,6 @@ Editor.addObject = function(obj, parent) parent = Editor.program.scene; } - //TODO Editor.history.add(new ObjectAddedAction(obj, parent)); @@ -1067,34 +1066,19 @@ Editor.selectTool = function(tool) Editor.updateSettings = function() { - var tab = Editor.gui.bottomTab.getActual(); - if(tab !== null) - { - tab.updateSettings(); - } + Editor.gui.bottomTab.updateSettings(); }; //Update all object views Editor.updateObjectsViewsGUI = function() { - //Update tree view to match actual scene Editor.gui.treeView.updateObjectsView(); - //Update tabs - var tab = Editor.gui.bottomTab.getActual(); - if(tab !== null) - { - tab.updateObjectsView(); - } - - var tab = Editor.gui.tab.getActual(); - if(tab !== null) - { - tab.updateObjectsView(); - } + Editor.gui.bottomTab.updateObjectsView(); + Editor.gui.bottomTab.updateMetadata(); + Editor.gui.tab.updateObjectsView(); Editor.gui.tab.updateMetadata(); - Editor.gui.bottomTab.updateMetadata(); }; @@ -1117,11 +1101,7 @@ Editor.updateSelectionGUI = function() //Bottom tab group Editor.gui.bottomTab.updateMetadata(); - var tab = Editor.gui.bottomTab.getActual(); - if(tab !== null) - { - tab.updateSelection(); - } + Editor.gui.bottomTab.updateSelection(); //Right side tab group /*Editor.gui.bottomTab.updateMetadata(); diff --git a/source/editor/ui/TabGroup.js b/source/editor/ui/TabGroup.js index f8440b8d5..92650a37e 100644 --- a/source/editor/ui/TabGroup.js +++ b/source/editor/ui/TabGroup.js @@ -58,6 +58,33 @@ TabGroup.prototype.updateMetadata = function() } }; +//Update all tab object views +TabGroup.prototype.updateObjectsView = function() +{ + for(var i = 0; i < this.options.length; i++) + { + this.options[i].updateObjectsView(); + } +}; + +//Update all tab object views +TabGroup.prototype.updateSelection = function() +{ + for(var i = 0; i < this.options.length; i++) + { + this.options[i].updateSelection(); + } +}; + +//Update all tab object views +TabGroup.prototype.updateSettings = function() +{ + for(var i = 0; i < this.options.length; i++) + { + this.options[i].updateSettings(); + } +}; + //Get actual tab TabGroup.prototype.getActual = function() { diff --git a/source/editor/ui/tab/asset/AssetExplorer.js b/source/editor/ui/tab/asset/AssetExplorer.js index 368822d70..9883787b3 100644 --- a/source/editor/ui/tab/asset/AssetExplorer.js +++ b/source/editor/ui/tab/asset/AssetExplorer.js @@ -93,11 +93,6 @@ AssetExplorer.prototype.updateSelection = function() AssetExplorer.prototype.updateObjectsView = function() { - if(!this.active) - { - return; - } - this.clear(); ResourceManager.retrieveResources(Editor.program);