mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-19 06:43:58 -07:00
Fix and simplify areFilters functions
Workaround is not needed anymore since 37e08a4ffb
This was SVN commit r25601.
This commit is contained in:
parent
7e92f714ca
commit
0d87ec5cf4
1 changed files with 1 additions and 7 deletions
|
|
@ -312,12 +312,6 @@ function closePage()
|
|||
Engine.SwitchGuiPage("page_pregame.xml", {});
|
||||
}
|
||||
|
||||
function areFilters()
|
||||
{
|
||||
let searchText = Engine.GetGUIObjectByName("modGenericFilter").caption;
|
||||
return searchText && searchText != translate("Filter");
|
||||
}
|
||||
|
||||
/**
|
||||
* Moves an item in the list up or down.
|
||||
*/
|
||||
|
|
@ -326,7 +320,7 @@ function moveCurrItem(objectName, up)
|
|||
// Prevent moving while filters are applied
|
||||
// because we would need to map filtered positions
|
||||
// to not filtered positions so changes will persist.
|
||||
if (areFilters())
|
||||
if (Engine.GetGUIObjectByName("modGenericFilter").caption)
|
||||
return;
|
||||
|
||||
let obj = Engine.GetGUIObjectByName(objectName);
|
||||
|
|
|
|||
Loading…
Reference in a new issue