summaryrefslogtreecommitdiff
path: root/addons/gdUnit4/src/core/command/GdUnitCommandInspectorTreeExpand.gd
diff options
context:
space:
mode:
authorradiohotline <radoihotline@disroot.rg>2026-08-25 16:33:56 +0300
committerradiohotline <radoihotline@disroot.rg>2026-08-25 16:33:56 +0300
commita89e744ed0e8c759caf041a580112365bbfe4303 (patch)
treedd61e320904176995727e86a857d00c90d4933ba /addons/gdUnit4/src/core/command/GdUnitCommandInspectorTreeExpand.gd
parent6d53d8cac78250dc888aa49d5f9d4175c6652feb (diff)
escoria updateHEADmain
Diffstat (limited to 'addons/gdUnit4/src/core/command/GdUnitCommandInspectorTreeExpand.gd')
-rw-r--r--addons/gdUnit4/src/core/command/GdUnitCommandInspectorTreeExpand.gd25
1 files changed, 25 insertions, 0 deletions
diff --git a/addons/gdUnit4/src/core/command/GdUnitCommandInspectorTreeExpand.gd b/addons/gdUnit4/src/core/command/GdUnitCommandInspectorTreeExpand.gd
new file mode 100644
index 0000000..76f8d0b
--- /dev/null
+++ b/addons/gdUnit4/src/core/command/GdUnitCommandInspectorTreeExpand.gd
@@ -0,0 +1,25 @@
+class_name GdUnitCommandInspectorTreeExpand
+extends GdUnitBaseCommand
+
+const InspectorTreeMainPanel := preload("res://addons/gdUnit4/src/ui/parts/InspectorTreeMainPanel.gd")
+const ID := "Inspector Tree Expand"
+
+
+func _init() -> void:
+ super(ID, GdUnitShortcut.ShortCut.NONE)
+ icon = GdUnitUiTools.get_icon("ExpandTree")
+
+
+func is_running() -> bool:
+ return false
+
+
+func execute(..._parameters: Array) -> void:
+ var inspector: InspectorTreeMainPanel = EditorInterface.get_base_control().get_meta("GdUnit4Inspector")
+ var selected_item := inspector._tree.get_selected()
+ if selected_item == null:
+ selected_item = inspector._tree.get_root()
+ else:
+ selected_item = selected_item.get_parent()
+
+ inspector.do_collapse_all(false, selected_item)