[longomatch] Fix players filtering
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Fix players filtering
- Date: Sat, 1 Jun 2013 10:45:31 +0000 (UTC)
commit bd82deecdbfe2f4c953eb4ff37d72e10900ecbfc
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Thu May 30 22:58:47 2013 +0200
Fix players filtering
LongoMatch.Core/Common/PlaysFilter.cs | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/LongoMatch.Core/Common/PlaysFilter.cs b/LongoMatch.Core/Common/PlaysFilter.cs
index 535c73e..ccc9388 100644
--- a/LongoMatch.Core/Common/PlaysFilter.cs
+++ b/LongoMatch.Core/Common/PlaysFilter.cs
@@ -142,21 +142,18 @@ namespace LongoMatch.Common
}
void UpdateFilters () {
+ UpdateVisiblePlayers ();
UpdateVisibleCategories ();
UpdateVisiblePlays ();
- UpdateVisiblePlayers ();
}
void UpdateVisiblePlayers () {
visiblePlayers = new List<Player>();
- if (PlayersFilterEnabled) {
- return;
- }
-
foreach (Player p in project.LocalTeamTemplate.Concat (project.VisitorTeamTemplate)) {
- if (playersFilter.Contains (p)) {
- visiblePlayers.Add (p);
+ if (PlayersFilterEnabled && ! playersFilter.Contains (p)) {
+ continue;
}
+ visiblePlayers.Add (p);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]