fix broken parse text cache in some cases

This commit is contained in:
commy2 2015-04-26 19:33:08 +02:00
parent 7319a3dbc6
commit 5320f4c6b7
2 changed files with 3 additions and 1 deletions

View File

@ -7,6 +7,8 @@ _ctrl = _this select 0;
_index = _this select 1;
_text = _this select 2;
//systemChat str (_text != ARR_SELECT(GVAR(ParsedTextCached),_index,"-1"));
if (_text != ARR_SELECT(GVAR(ParsedTextCached),_index,"-1")) then {
GVAR(ParsedTextCached) set [_index, _text];
_ctrl ctrlSetStructuredText parseText _text;

View File

@ -77,7 +77,6 @@ if (GVAR(openedMenuType) >= 0) then {
GVAR(startHoverTime) = diag_tickTime;
GVAR(lastPath) = _hoverPath;
GVAR(expanded) = false;
GVAR(ParsedTextCached) = [];
} else {
if(!GVAR(expanded) && diag_tickTime-GVAR(startHoverTime) > 0.25) then {
GVAR(expanded) = true;
@ -120,6 +119,7 @@ if(!_foundTarget && GVAR(actionSelected)) then {
};
for "_i" from GVAR(iconCount) to (count GVAR(iconCtrls))-1 do {
ctrlDelete (GVAR(iconCtrls) select _i);
GVAR(ParsedTextCached) set [_i, ""];
};
GVAR(iconCtrls) resize GVAR(iconCount);
GVAR(iconCount) = 0;