aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoravenjamin <avenjamin@gmail.com>2008-11-26 04:18:52 +0000
committeravenjamin <avenjamin@gmail.com>2008-11-26 04:18:52 +0000
commit3c1132d4cfebf5891afbe98fdff667d6bcf0f3e5 (patch)
tree0b141c8bee9cbab47ca1d4ef4aebd0d755b37228
parentae9839c6219f6601003ed355033cb6148c384bef (diff)
downloadsequelpro-3c1132d4cfebf5891afbe98fdff667d6bcf0f3e5.tar.gz
sequelpro-3c1132d4cfebf5891afbe98fdff667d6bcf0f3e5.tar.bz2
sequelpro-3c1132d4cfebf5891afbe98fdff667d6bcf0f3e5.zip
Tiny clean up.
-rw-r--r--TableDocument.m5
1 files changed, 3 insertions, 2 deletions
diff --git a/TableDocument.m b/TableDocument.m
index f473dfd2..785907f1 100644
--- a/TableDocument.m
+++ b/TableDocument.m
@@ -545,8 +545,7 @@ NSString *TableDocumentFavoritesControllerFavoritesDidChange = @"TableDocumentFa
*/
- (void)toggleConsole:(id)sender
{
- NSDrawerState state = [consoleDrawer state];
- if (NSDrawerOpeningState == state || NSDrawerOpenState == state) {
+ if ([self consoleIsOpened]) {
[consoleDrawer close];
} else {
[consoleTextView scrollRangeToVisible:[consoleTextView selectedRange]];
@@ -582,6 +581,7 @@ NSString *TableDocumentFavoritesControllerFavoritesDidChange = @"TableDocumentFa
[consoleTextView replaceCharactersInRange:NSMakeRange(begin,0) withString:message];
end = [[consoleTextView string] length];
[consoleTextView setTextColor:[NSColor blackColor] range:NSMakeRange(begin,end-begin)];
+
if ([self consoleIsOpened]) {
[consoleTextView displayIfNeeded];
[consoleTextView scrollRangeToVisible:[consoleTextView selectedRange]];
@@ -600,6 +600,7 @@ NSString *TableDocumentFavoritesControllerFavoritesDidChange = @"TableDocumentFa
[consoleTextView replaceCharactersInRange:NSMakeRange(begin,0) withString:error];
end = [[consoleTextView string] length];
[consoleTextView setTextColor:[NSColor redColor] range:NSMakeRange(begin,end-begin)];
+
if ([self consoleIsOpened]) {
[consoleTextView displayIfNeeded];
[consoleTextView scrollRangeToVisible:[consoleTextView selectedRange]];