Arsenal - Fix sort running twice (#8479)

This commit is contained in:
mharis001 2021-10-06 23:16:42 -04:00 committed by GitHub
parent d836cbfe6e
commit d6559f22e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 7 deletions

View File

@ -37,10 +37,6 @@ _ctrlPanel ctrlCommit FADE_DELAY;
_ctrlPanel lbSetCurSel -1;
// Fill sort options
private _sortLeftCtrl = _display displayCtrl IDC_sortLeftTab;
[_display, _control, _sortLeftCtrl] call FUNC(fillSort);
// Handle icons and filling
switch true do {
case (_ctrlIDC in [IDC_buttonPrimaryWeapon, IDC_buttonHandgun, IDC_buttonSecondaryWeapon]) : {
@ -191,7 +187,8 @@ GVAR(currentLeftPanel) = _ctrlIDC;
[QGVAR(leftPanelFilled), [_display, _ctrlIDC, GVAR(currentRightPanel)]] call CBA_fnc_localEvent;
// Sort
[_sortLeftCtrl] call FUNC(sortPanel);
private _sortLeftCtrl = _display displayCtrl IDC_sortLeftTab;
[_display, _control, _sortLeftCtrl] call FUNC(fillSort);
//Select current item
private _itemsToCheck = ((GVAR(currentItems) select [0,15]) + [GVAR(currentFace), GVAR(currentVoice), GVAR(currentInsignia)]) apply {tolower _x};

View File

@ -363,8 +363,6 @@ if (GVAR(currentLeftPanel) in [IDC_buttonUniform, IDC_buttonVest, IDC_buttonBack
private _sortRightCtrl = _display displayCtrl IDC_sortRightTab;
[_display, _control, _sortRightCtrl] call FUNC(fillSort);
[_sortRightCtrl] call FUNC(sortPanel);
// Select current data if not in a container
if (_itemsToCheck isNotEqualTo []) then {
for "_lbIndex" from 0 to (lbSize _ctrlPanel - 1) do {