소스 검색

Filtree: fix multi-selection from scene

lviguier 2 주 전
부모
커밋
e85f7b05f6
2개의 변경된 파일4개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 2
      hide/comp/FancyTree.hx
  2. 1 1
      hide/comp/SceneEditor.hx

+ 3 - 2
hide/comp/FancyTree.hx

@@ -373,8 +373,9 @@ class FancyTree<TreeItem> extends hide.comp.Component {
 		flattenRec(rootData, flatData);
 		flattenRec(rootData, flatData);
 	}
 	}
 
 
-	public function selectItem(item: TreeItem, openSelf: Bool = false) {
-		clearSelection();
+	public function selectItem(item: TreeItem, openSelf: Bool = false, clearPrevSelection : Bool = true) {
+		if (clearPrevSelection)
+			clearSelection();
 		var data = itemMap.get(cast item);
 		var data = itemMap.get(cast item);
 		if (data == null) {
 		if (data == null) {
 			return;
 			return;

+ 1 - 1
hide/comp/SceneEditor.hx

@@ -3765,7 +3765,7 @@ class SceneEditor {
 				case Default, NoHistory:
 				case Default, NoHistory:
 					sceneTree.clearSelection();
 					sceneTree.clearSelection();
 					for (e in elts)
 					for (e in elts)
-						sceneTree.selectItem(e, true);
+						sceneTree.selectItem(e, true, false);
 				case Nothing, NoTree:
 				case Nothing, NoTree:
 			}
 			}