aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPHistoryController.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2010-05-22 12:21:54 +0000
committerrowanbeentje <rowan@beent.je>2010-05-22 12:21:54 +0000
commit76633d986085d3b9d05f73db8d51aefdf1f68dfb (patch)
treee36758acc38f519560b1fe0b1b0c476b03b27d46 /Source/SPHistoryController.m
parentbd78aaeadb8dfd0eb83a896727e6376109c12e22 (diff)
downloadsequelpro-76633d986085d3b9d05f73db8d51aefdf1f68dfb.tar.gz
sequelpro-76633d986085d3b9d05f73db8d51aefdf1f68dfb.tar.bz2
sequelpro-76633d986085d3b9d05f73db8d51aefdf1f68dfb.zip
- Fix an issue when truncating tables using the right-click menu, by improving the truncation reload code and by removing a problem in TableContent tracking the active table name. This addresses Issue #700 and a number of crash reports.
- Rename SPHistoryView* constants to SPTableView* constants and use them more widely rather than hard-coded tab indexes - Fix a problem preventing history navigation if a triggers view was the previous item in the history
Diffstat (limited to 'Source/SPHistoryController.m')
-rw-r--r--Source/SPHistoryController.m26
1 files changed, 13 insertions, 13 deletions
diff --git a/Source/SPHistoryController.m b/Source/SPHistoryController.m
index 567ebd7a..b8128a0f 100644
--- a/Source/SPHistoryController.m
+++ b/Source/SPHistoryController.m
@@ -172,18 +172,18 @@
NSString *viewName = [[[theDocument valueForKey:@"tableTabView"] selectedTabViewItem] identifier];
if ([viewName isEqualToString:@"source"]) {
- theView = SPHistoryViewStructure;
+ theView = SPTableViewStructure;
} else if ([viewName isEqualToString:@"content"]) {
- theView = SPHistoryViewContent;
+ theView = SPTableViewContent;
} else if ([viewName isEqualToString:@"customQuery"]) {
- theView = SPHistoryViewCustomQuery;
+ theView = SPTableViewCustomQuery;
} else if ([viewName isEqualToString:@"status"]) {
- theView = SPHistoryViewStatus;
+ theView = SPTableViewStatus;
} else if ([viewName isEqualToString:@"relations"]) {
- theView = SPHistoryViewRelations;
+ theView = SPTableViewRelations;
}
else if ([viewName isEqualToString:@"triggers"]) {
- theView = SPHistoryViewTriggers;
+ theView = SPTableViewTriggers;
}
return theView;
@@ -402,7 +402,7 @@
// If the database, table, and view are the same and content - just trigger a table reload (filters)
if ([[theDocument database] isEqualToString:[historyEntry objectForKey:@"database"]]
&& [historyEntry objectForKey:@"table"] && [[theDocument table] isEqualToString:[historyEntry objectForKey:@"table"]]
- && [[historyEntry objectForKey:@"view"] integerValue] == [self currentlySelectedView] == SPHistoryViewContent)
+ && [[historyEntry objectForKey:@"view"] integerValue] == [self currentlySelectedView] == SPTableViewContent)
{
[tableContentInstance loadTable:[historyEntry objectForKey:@"table"]];
modifyingState = NO;
@@ -433,22 +433,22 @@
// Check and set the view
if ([self currentlySelectedView] != [[historyEntry objectForKey:@"view"] integerValue]) {
switch ([[historyEntry objectForKey:@"view"] integerValue]) {
- case SPHistoryViewStructure:
+ case SPTableViewStructure:
[theDocument viewStructure:self];
break;
- case SPHistoryViewContent:
+ case SPTableViewContent:
[theDocument viewContent:self];
break;
- case SPHistoryViewCustomQuery:
+ case SPTableViewCustomQuery:
[theDocument viewQuery:self];
break;
- case SPHistoryViewStatus:
+ case SPTableViewStatus:
[theDocument viewStatus:self];
break;
- case SPHistoryViewRelations:
+ case SPTableViewRelations:
[theDocument viewRelations:self];
break;
- case SPTriggersViewMode:
+ case SPTableViewTriggers:
[theDocument viewTriggers:self];
break;
}