aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPWindowController.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPWindowController.m')
-rw-r--r--Source/SPWindowController.m13
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/SPWindowController.m b/Source/SPWindowController.m
index 89879b0f..4c25ece2 100644
--- a/Source/SPWindowController.m
+++ b/Source/SPWindowController.m
@@ -291,6 +291,19 @@
return documentsArray;
}
+/**
+ * Select tab at index.
+ */
+- (void)selectTabAtIndex:(NSInteger)index
+{
+ if([[tabBar cells] count] > 0 && [[tabBar cells] count] > index) {
+ [tabView selectTabViewItemAtIndex:index];
+ } else if([[tabBar cells] count]) {
+ [tabView selectTabViewItemAtIndex:0];
+ }
+
+}
+
#pragma mark -
#pragma mark Tab view delegate methods