From 3f1108bea280b1c5505c4673288628bd5edd95f8 Mon Sep 17 00:00:00 2001 From: alpinechough Date: Sat, 15 Jan 2011 16:39:06 +0800 Subject: [PATCH] Expand on double click fix. --- gui/gtk/CoverageView.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gui/gtk/CoverageView.cs b/gui/gtk/CoverageView.cs index b93327b..740f27e 100644 --- a/gui/gtk/CoverageView.cs +++ b/gui/gtk/CoverageView.cs @@ -271,11 +271,12 @@ public class CoverageView { SourceWindow sourceView = ShowSourceFor (method.ParentClass); sourceView.CenterOnMethod (method); } else { - if (tree.ExpandRow (model.GetPath (iter), true)) { - // LAME: This seems to collapse the entire tree... - tree.CollapseRow (model.GetPath (iter)); + TreePath treePath = model.GetPath (iter); + + if (tree.GetRowExpanded (treePath)) { + tree.CollapseRow (treePath); } else { - tree.ExpandRow (model.GetPath (iter), false); + tree.ExpandRow (treePath, false); } } }