aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2011-01-06 18:13:08 +0000
committerBibiko <bibiko@eva.mpg.de>2011-01-06 18:13:08 +0000
commitcc9be0fd6dd193db4615a6a5a94913a3c7b56a68 (patch)
tree02cf3a2193faf8b45d33ab570f994562be017726 /Source
parent1bb16aa9943b686f4bf0b5adb3fe42495cf74f35 (diff)
downloadsequelpro-cc9be0fd6dd193db4615a6a5a94913a3c7b56a68.tar.gz
sequelpro-cc9be0fd6dd193db4615a6a5a94913a3c7b56a68.tar.bz2
sequelpro-cc9be0fd6dd193db4615a6a5a94913a3c7b56a68.zip
• trial to fix boundsDidChangeNotification for logs 1894, 1900, 1901
Diffstat (limited to 'Source')
-rw-r--r--Source/SPBundleCommandTextView.m4
-rw-r--r--Source/SPTextView.m8
2 files changed, 6 insertions, 6 deletions
diff --git a/Source/SPBundleCommandTextView.m b/Source/SPBundleCommandTextView.m
index cd6e5706..d9aae0f7 100644
--- a/Source/SPBundleCommandTextView.m
+++ b/Source/SPBundleCommandTextView.m
@@ -31,8 +31,8 @@
- (void)dealloc
{
- [prefs removeObserver:self forKeyPath:SPCustomQueryEditorTabStopWidth];
[[NSNotificationCenter defaultCenter] removeObserver:self];
+ [prefs removeObserver:self forKeyPath:SPCustomQueryEditorTabStopWidth];
[prefs release];
[lineNumberView release];
}
@@ -62,7 +62,7 @@
[[self layoutManager] setBackgroundLayoutEnabled:NO];
// add NSViewBoundsDidChangeNotification to scrollView
- [[commandScrollView contentView] setPostsBoundsChangedNotifications:YES];
+ [commandScrollView setPostsBoundsChangedNotifications:YES];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(boundsDidChangeNotification:) name:NSViewBoundsDidChangeNotification object:[commandScrollView contentView]];
}
diff --git a/Source/SPTextView.m b/Source/SPTextView.m
index 97037e0b..4867597a 100644
--- a/Source/SPTextView.m
+++ b/Source/SPTextView.m
@@ -152,7 +152,7 @@ NSInteger alphabeticSort(id string1, id string2, void *reverse)
[[self layoutManager] setBackgroundLayoutEnabled:NO];
// add NSViewBoundsDidChangeNotification to scrollView
- [[scrollView contentView] setPostsBoundsChangedNotifications:YES];
+ [scrollView setPostsBoundsChangedNotifications:YES];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(boundsDidChangeNotification:) name:NSViewBoundsDidChangeNotification object:[scrollView contentView]];
[self setQueryHiliteColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorHighlightQueryColor]]];
@@ -3013,9 +3013,9 @@ NSInteger alphabeticSort(id string1, id string2, void *reverse)
/**
* Scrollview delegate after the textView's view port was changed.
- * Manily used to update the syntax highlighting for a large text size.
+ * Manily used to update the syntax highlighting for a large text size and line numbering rendering.
*/
-- (void) boundsDidChangeNotification:(NSNotification *)notification
+- (void)boundsDidChangeNotification:(NSNotification *)notification
{
// Invoke syntax highlighting if text view port was changed for large text
if(startListeningToBoundChanges && [[self string] length] > SP_TEXT_SIZE_TRIGGER_FOR_PARTLY_PARSING)
@@ -3028,7 +3028,7 @@ NSInteger alphabeticSort(id string1, id string2, void *reverse)
[self performSelector:@selector(doSyntaxHighlighting) withObject:nil afterDelay:0.4];
}
else
- [[scrollView contentView] display];
+ [scrollView displayRect:[scrollView visibleRect]];
}