[longomatch] Fix multiselection function



commit e8a47917693ab0b6b81e05b9de526cb8627fd137
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Tue Jan 5 01:12:10 2010 +0100

    Fix multiselection function

 LongoMatch/Gui/TreeView/PlaysTreeView.cs |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/LongoMatch/Gui/TreeView/PlaysTreeView.cs b/LongoMatch/Gui/TreeView/PlaysTreeView.cs
index 0168c99..fd3a0eb 100644
--- a/LongoMatch/Gui/TreeView/PlaysTreeView.cs
+++ b/LongoMatch/Gui/TreeView/PlaysTreeView.cs
@@ -217,13 +217,11 @@ namespace LongoMatch.Gui.Component
 		
 		private bool SelectFunction(TreeSelection selection, TreeModel model, TreePath path, bool selected){
 			// Don't allow multiselect for categories
-			if (!selected &&  selection.GetSelectedRows().Length > 0){
-				if (selection.GetSelectedRows().Length == 1){
-					return !(GetValueFromPath(selection.GetSelectedRows()[0]) is SectionsTimeNode);
-				}
-				else{
-					return !(GetValueFromPath(path) is SectionsTimeNode);			
-				}					
+			if (!selected && selection.GetSelectedRows().Length > 0){
+				if (selection.GetSelectedRows().Length == 1 &&
+				    GetValueFromPath(selection.GetSelectedRows()[0]) is SectionsTimeNode)
+					return false;	
+				return !(GetValueFromPath(path) is SectionsTimeNode);										
 			}
 			// Always unselect
 			else



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]