[blam] Move ItemList.GetSelected() to use Selected()



commit 720fb056df985e395be12c9b7f0e44353c1363e9
Author: Carlos MartÃn Nieto <cmn dwim me>
Date:   Tue Jan 15 23:14:09 2013 +0100

    Move ItemList.GetSelected() to use Selected()

 src/ItemList.cs |   19 +++++++++----------
 1 files changed, 9 insertions(+), 10 deletions(-)
---
diff --git a/src/ItemList.cs b/src/ItemList.cs
index 84bf841..7d8799d 100644
--- a/src/ItemList.cs
+++ b/src/ItemList.cs
@@ -194,18 +194,17 @@ namespace Imendio.Blam {
 	    }
 	}
 
-	public Item GetSelected ()
-	{
-	    TreeIter  iter;
-	    TreeModel model;
+		public Item GetSelected()
+		{
+			TreeIter iter;
+			TreeModel model;
 
-	    if (!this.Selection.GetSelected (out model, out iter)) {
-		return null;
-	    }
+			if (Selected(out model, out iter))
+				return (Item)model.GetValue(iter, 0);
+
+			return null;
+		}
 
-	    return (Item) model.GetValue (iter, 0);
-	}
-	
 	private void SelectionChanged (object obj, EventArgs args)
 	{
 	    TreeSelection selection = (TreeSelection) obj;



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