Corrected current unit updating

This commit is contained in:
SilentSpike 2015-07-18 18:25:59 +01:00
parent e4ba5aaf1b
commit f7cf983e92

View File

@ -23,6 +23,11 @@ if (isNull (GETUVAR(GVAR(display),displayNull))) exitWith { [_this select 1] cal
GVAR(unitList) = GVAR(unitList) - allDead; GVAR(unitList) = GVAR(unitList) - allDead;
GVAR(unitList) = GVAR(unitList) - [objNull]; GVAR(unitList) = GVAR(unitList) - [objNull];
// Camera shouldn't stay on unit that isn't in the list
if !(GVAR(camUnit) in GVAR(unitList)) then {
[0,objNull] call FUNC(updateCamera);
};
// Fetch tree // Fetch tree
disableSerialization; disableSerialization;
_display = GETUVAR(GVAR(display),displayNull); _display = GETUVAR(GVAR(display),displayNull);
@ -66,9 +71,5 @@ _cachedGrps = [];
_ctrl tvExpand [_node]; _ctrl tvExpand [_node];
} forEach GVAR(unitList); } forEach GVAR(unitList);
if ((tvCurSel _ctrl) isEqualTo []) then {
[0,objNull] call FUNC(updateCamera);
};
// Sort group nodes by side // Sort group nodes by side
_ctrl tvSortByValue [[],false]; _ctrl tvSortByValue [[],false];