aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2010-04-27 16:19:50 +0000
committerstuconnolly <stuart02@gmail.com>2010-04-27 16:19:50 +0000
commit43770a73682cea0c2f34092e56e5688678db0142 (patch)
tree27dec24ee1b6880feda2d36abeb83ea038180b58 /Source
parentf22d42877a8ea4ea5c67fc8a95a62cd00d2d74e2 (diff)
downloadsequelpro-43770a73682cea0c2f34092e56e5688678db0142.tar.gz
sequelpro-43770a73682cea0c2f34092e56e5688678db0142.tar.bz2
sequelpro-43770a73682cea0c2f34092e56e5688678db0142.zip
Remeber to refresh the user manager's schemas table view when switching to the schema privileges tab. Fixes issue #648.
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.