aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPDatabaseDocument.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2011-08-31 01:23:29 +0000
committerrowanbeentje <rowan@beent.je>2011-08-31 01:23:29 +0000
commitdebc98eb182d845e4ab803c1cd1d84908da745d3 (patch)
tree178b95a43aceb14c427fb49a7e185115eaab6b39 /Source/SPDatabaseDocument.m
parenta15f9f07c618351d61cc1991edf8c8b892e7d13e (diff)
downloadsequelpro-debc98eb182d845e4ab803c1cd1d84908da745d3.tar.gz
sequelpro-debc98eb182d845e4ab803c1cd1d84908da745d3.tar.bz2
sequelpro-debc98eb182d845e4ab803c1cd1d84908da745d3.zip
- Clean up undo manager handling
- Implement an undo manager per tab (strictly speaking, per connection 'document'), addressing Issue #1109.
Diffstat (limited to 'Source/SPDatabaseDocument.m')
-rw-r--r--Source/SPDatabaseDocument.m12
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m
index d9e9b671..18bc6407 100644
--- a/Source/SPDatabaseDocument.m
+++ b/Source/SPDatabaseDocument.m
@@ -176,6 +176,7 @@ static NSString *SPCreateSyntx = @"SPCreateSyntax";
[printWebView setFrameLoadDelegate:self];
prefs = [NSUserDefaults standardUserDefaults];
+ undoManager = [[NSUndoManager alloc] init];
#endif
queryEditorInitString = nil;
@@ -4128,6 +4129,15 @@ static NSString *SPCreateSyntx = @"SPCreateSyntax";
}
return [[[self fileURL] path] lastPathComponent];
}
+
+#ifndef SP_REFACTOR
+- (NSUndoManager *)undoManager
+{
+ return undoManager;
+}
+#endif
+
+
#ifndef SP_REFACTOR /* state saving and setting */
#pragma mark -
#pragma mark State saving and setting
@@ -5629,11 +5639,13 @@ static NSString *SPCreateSyntx = @"SPCreateSyntax";
for (id retainedObject in nibObjectsToRelease) [retainedObject release];
[nibObjectsToRelease release];
+
#endif
[allDatabases release];
[allSystemDatabases release];
#ifndef SP_REFACTOR /* dealloc ivars */
+ [undoManager release];
[printWebView release];
#endif
[taskProgressWindow close];