Browse Source

Editor: fixed selection of subobjects when clicking in outliner.

alteredq 13 years ago
parent
commit
d9a702bc3d
1 changed files with 4 additions and 6 deletions
  1. 4 6
      editor/js/ui/Sidebar.Outliner.js

+ 4 - 6
editor/js/ui/Sidebar.Outliner.js

@@ -31,18 +31,16 @@ Sidebar.Outliner = function ( signals ) {
 
 		var id = parseInt( sceneGraph.getValue() );
 
-		for ( var i in scene.children ) {
+		scene.traverse( function ( node ) {
 
-			var object = scene.children[ i ];
+			if ( node.id === id ) {
 
-			if ( object.id === id ) {
-
-				signals.objectSelected.dispatch( object );
+				signals.objectSelected.dispatch( node );
 				return;
 
 			}
 
-		}
+		} );
 
 	}