[Monodevelop-patches-list] r629 - trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/Tree
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Sat Jan 24 13:15:51 EST 2004
Author: benm
Date: 2004-01-24 13:15:51 -0500 (Sat, 24 Jan 2004)
New Revision: 629
Modified:
trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/Tree/TreeView.cs
Log:
fix up selection stuff
Modified: trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/Tree/TreeView.cs
===================================================================
--- trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/Tree/TreeView.cs 2004-01-24 18:15:27 UTC (rev 628)
+++ trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/Tree/TreeView.cs 2004-01-24 18:15:51 UTC (rev 629)
@@ -76,24 +76,16 @@
public TreeNode SelectedNode {
get {
+
Gtk.TreeModel foo;
Gtk.TreeIter iter;
- if (Selection.GetSelected(out foo, out iter) == false) {
+ if (! Selection.GetSelected (out foo, out iter))
return null;
- }
- return (TreeNode) store.GetValue(iter, 2);
+
+ return (TreeNode) store.GetValue (iter, 2);
}
- set {
- Gtk.TreeIter iter;
- if (store.GetIterFirst(out iter) == false) {
- return;
- }
- do {
- if (store.GetValue(iter, 2) == value) {
- Selection.SelectIter(iter);
- return;
- }
- } while (store.IterNext(out iter) == true);
+ set {
+ Selection.SelectIter (value.TreeIter);
}
}
More information about the Monodevelop-patches-list
mailing list