aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/SPUserManager.h2
-rw-r--r--Source/SPUserManager.m12
2 files changed, 13 insertions, 1 deletions
diff --git a/Source/SPUserManager.h b/Source/SPUserManager.h
index 27590274..e6eedf50 100644
--- a/Source/SPUserManager.h
+++ b/Source/SPUserManager.h
@@ -27,7 +27,7 @@
@class BWAnchoredButtonBar;
-@interface SPUserManager : NSWindowController
+@interface SPUserManager : NSWindowController
{
NSPersistentStoreCoordinator *persistentStoreCoordinator;
NSManagedObjectModel *managedObjectModel;
diff --git a/Source/SPUserManager.m b/Source/SPUserManager.m
index 26986d0b..89a52168 100644
--- a/Source/SPUserManager.m
+++ b/Source/SPUserManager.m
@@ -265,6 +265,8 @@
- (void)_initializeSchemaPrivs
{
// Initialize Databases
+ [schemas removeAllObjects];
+
MCPResult *results = [self.mySqlConnection listDBs];
if ([results numOfRows]) {
@@ -1305,6 +1307,16 @@
}
#pragma mark -
+#pragma mark Tab view delegate methods
+
+- (void)tabView:(NSTabView *)usersTabView willSelectTabViewItem:(NSTabViewItem *)tabViewItem
+{
+ if ([[tabViewItem identifier] isEqualToString:@"Schema Privileges"]) {
+ [self _initializeSchemaPrivs];
+ }
+}
+
+#pragma mark -
/**
* Dealloc. Get rid of everything.