@@ -9,8 +9,6 @@ namespace GitHub.Unity
9
9
[ Serializable ]
10
10
public class TreeNodeDictionary : SerializableDictionary < string , TreeNode > { }
11
11
12
- public class TreeSelection : ScriptableObject { }
13
-
14
12
[ Serializable ]
15
13
public abstract class Tree < TNode , TData > : TreeBase < TNode , TData >
16
14
where TNode : TreeNode
@@ -30,18 +28,12 @@ public abstract class Tree<TNode, TData>: TreeBase<TNode, TData>
30
28
[ NonSerialized ] private TNode rightClickNextRenderNode ;
31
29
32
30
[ NonSerialized ] private int controlId ;
33
- [ NonSerialized ] protected TreeSelection selectionObject ;
34
31
35
32
public bool IsInitialized { get { return Nodes != null && Nodes . Count > 0 && ! String . IsNullOrEmpty ( Nodes [ 0 ] . Path ) ; } }
36
33
public bool RequiresRepaint { get ; private set ; }
37
34
38
35
public Rect Render ( Rect treeDisplayRect , Vector2 scroll , Action < TNode > singleClick = null , Action < TNode > doubleClick = null , Action < TNode > rightClick = null )
39
36
{
40
- if ( Selection . activeObject != selectionObject )
41
- {
42
- SelectedNode = null ;
43
- }
44
-
45
37
controlId = GUIUtility . GetControlID ( FocusType . Keyboard ) ;
46
38
var treeHasFocus = GUIUtility . keyboardControl == controlId ;
47
39
@@ -333,10 +325,7 @@ protected void LoadNodeIcons()
333
325
334
326
public void OnEnable ( )
335
327
{
336
- if ( ! selectionObject )
337
- {
338
- selectionObject = ScriptableObject . CreateInstance < TreeSelection > ( ) ;
339
- }
328
+
340
329
}
341
330
}
342
331
@@ -581,10 +570,6 @@ public override TreeNode SelectedNode
581
570
set
582
571
{
583
572
selectedNode = value ;
584
- if ( value != null && selectionObject )
585
- {
586
- Selection . activeObject = selectionObject ;
587
- }
588
573
}
589
574
}
590
575
0 commit comments