mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-21 21:04:44 +00:00
Fix and simplify areFilters functions
Workaround is not needed anymore since 37e08a4ffb
This was SVN commit r25601.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user