From b92b0e9189111d96f61a53878dc96035922b1763 Mon Sep 17 00:00:00 2001 From: mharis001 <34453221+mharis001@users.noreply.github.com> Date: Tue, 13 Jul 2021 18:22:28 -0400 Subject: [PATCH] Editor - Improve group trees deselect path check (#611) --- addons/editor/functions/fnc_handleLoad.sqf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/editor/functions/fnc_handleLoad.sqf b/addons/editor/functions/fnc_handleLoad.sqf index 4ebfc9b4a..11d69ca3c 100644 --- a/addons/editor/functions/fnc_handleLoad.sqf +++ b/addons/editor/functions/fnc_handleLoad.sqf @@ -86,9 +86,9 @@ _display displayAddEventHandler ["KeyDown", {call FUNC(handleKeyDown)}]; _ctrl ctrlAddEventHandler ["MouseButtonDown", { if (RscDisplayCurator_sections select 0 == 1) then { private _ctrlTree = call EFUNC(common,getActiveTree); - private _pathLength = count tvCurSel _ctrlTree; + private _path = tvCurSel _ctrlTree; - if (_pathLength > 0 && {_pathLength < 4}) then { + if (_path isNotEqualTo [] && {_ctrlTree tvCount _path > 0}) then { _ctrlTree tvSetCurSel [-1]; }; };