aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPTableContent.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2011-01-29 18:10:57 +0000
committerrowanbeentje <rowan@beent.je>2011-01-29 18:10:57 +0000
commitfeca4191773700887c4279390f94d6a8c65d399c (patch)
tree8548f03fa2a14ec46d106a586bb605c24407e51d /Source/SPTableContent.m
parent0846c7581fce4816c5d1afcb226f50da283f170e (diff)
downloadsequelpro-feca4191773700887c4279390f94d6a8c65d399c.tar.gz
sequelpro-feca4191773700887c4279390f94d6a8c65d399c.tar.bz2
sequelpro-feca4191773700887c4279390f94d6a8c65d399c.zip
- Improve thread safety when loading content views, improving Issue #953
Diffstat (limited to 'Source/SPTableContent.m')
-rw-r--r--Source/SPTableContent.m9
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/SPTableContent.m b/Source/SPTableContent.m
index 5243f3ce..7acc0187 100644
--- a/Source/SPTableContent.m
+++ b/Source/SPTableContent.m
@@ -244,14 +244,14 @@
// Scroll the viewport to the saved location
selectionViewportToRestore.size = [tableContentView visibleRect].size;
- [tableContentView scrollRectToVisible:selectionViewportToRestore];
+ [[tableContentView onMainThread] scrollRectToVisible:selectionViewportToRestore];
}
// Restore selection indexes if appropriate
if (selectionIndexToRestore) {
BOOL previousTableRowsSelectable = tableRowsSelectable;
tableRowsSelectable = YES;
- [tableContentView selectRowIndexes:selectionIndexToRestore byExtendingSelection:NO];
+ [[tableContentView onMainThread] selectRowIndexes:selectionIndexToRestore byExtendingSelection:NO];
tableRowsSelectable = previousTableRowsSelectable;
}
@@ -758,7 +758,7 @@
[self updateCountText];
// Update pagination
- [self updatePaginationState];
+ [[self onMainThread] updatePaginationState];
// Retrieve and cache the column definitions for editing views
if (cqColumnDefinition) [cqColumnDefinition release];
@@ -784,7 +784,7 @@
} else {
// Trigger a full reload if required
if (fullTableReloadRequired) [self reloadTable:self];
- [filterTableWindow setTitle:NSLocalizedString(@"Filter", @"filter label")];
+ [[filterTableWindow onMainThread] setTitle:NSLocalizedString(@"Filter", @"filter label")];
}
}
@@ -1467,6 +1467,7 @@
/**
* Update the state of the pagination buttons and text.
+ * This function is not thread-safe and should be called on the main thread.
*/
- (void) updatePaginationState
{