Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/xamarin/macdoc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremie Laval <jeremie.laval@gmail.com>2012-06-11 16:08:06 +0400
committerJeremie Laval <jeremie.laval@gmail.com>2012-06-11 16:08:06 +0400
commitc91393d8f67fd9955f8db528a99e6f9b618c4316 (patch)
treed41e7c37beac519b562889f34544b4155494987a /MyDocument.cs
parent0cefa6ae4bdeae5847b14919983e78c21c587fdb (diff)
[macdoc] Don't navigate to a row that doesn't exist
Diffstat (limited to 'MyDocument.cs')
-rw-r--r--MyDocument.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/MyDocument.cs b/MyDocument.cs
index 4ca86a3..fb99a35 100644
--- a/MyDocument.cs
+++ b/MyDocument.cs
@@ -498,7 +498,8 @@ namespace macdoc
ScrollToVisible ((Node) n.Nodes [n.Nodes.Count-1]);
var row = ScrollToVisible (n);
ignoreSelect = true;
- outlineView.SelectRows (new NSIndexSet (row), false);
+ if (row > 0)
+ outlineView.SelectRows (new NSIndexSet (row), false);
ignoreSelect = false;
}