aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--TableSource.m13
-rw-r--r--TablesList.h3
-rw-r--r--TablesList.m10
3 files changed, 26 insertions, 0 deletions
diff --git a/TableSource.m b/TableSource.m
index d43b83c5..9259a0b4 100644
--- a/TableSource.m
+++ b/TableSource.m
@@ -383,6 +383,9 @@ opens alertsheet and asks for confirmation
[tableType retain];
// [[NSNotificationCenter defaultCenter] postNotificationName:@"SelectedTableStatusHasChanged" object:self];
+
+ // Mark the content table for refresh
+ [tablesListInstance setContentRequiresReload];
} else {
[sender selectItemWithTitle:tableType];
NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil,
@@ -642,6 +645,10 @@ returns YES if no row is beeing edited and nothing has to be written to db
isEditingRow = NO;
isEditingNewRow = NO;
[self loadTable:selectedTable];
+
+ // Mark the content table for refresh
+ [tablesListInstance setContentRequiresReload];
+
return YES;
} else {
alertSheetOpened = YES;
@@ -694,6 +701,9 @@ returns YES if no row is beeing edited and nothing has to be written to db
if ( [[mySQLConnection getLastErrorMessage] isEqualToString:@""] ) {
[self loadTable:selectedTable];
+
+ // Mark the content table for refresh
+ [tablesListInstance setContentRequiresReload];
} else {
NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil,
[NSString stringWithFormat:NSLocalizedString(@"Couldn't remove field %@.\nMySQL said: %@", @"message of panel when field cannot be removed"),
@@ -913,6 +923,9 @@ Having validated a drop, perform the field/column reordering to match.
[[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:self];
+ // Mark the content table for refresh
+ [tablesListInstance setContentRequiresReload];
+
return YES;
}
diff --git a/TablesList.h b/TablesList.h
index 9a59de88..bc360434 100644
--- a/TablesList.h
+++ b/TablesList.h
@@ -73,6 +73,9 @@
- (BOOL)contentLoaded;
- (BOOL)statusLoaded;
+// Setter methods
+- (void)setContentRequiresReload;
+
//tableView datasource methods
- (int)numberOfRowsInTableView:(NSTableView *)aTableView;
- (id)tableView:(NSTableView *)aTableView
diff --git a/TablesList.m b/TablesList.m
index 0cad02c5..270cd49b 100644
--- a/TablesList.m
+++ b/TablesList.m
@@ -341,6 +341,16 @@ returns YES if table status has already been loaded
return statusLoaded;
}
+#pragma mark Setter methods
+
+/*
+Mark the content table for refresh when it's next switched to
+*/
+- (void)setContentRequiresReload
+{
+ contentLoaded = NO;
+}
+
#pragma mark Datasource methods
- (int)numberOfRowsInTableView:(NSTableView *)aTableView