aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPCustomQuery.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2013-01-22 01:38:43 +0000
committerrowanbeentje <rowan@beent.je>2013-01-22 01:38:43 +0000
commit2dbac79a1a531a75cc8eaf45e7aa47699f07cfa7 (patch)
tree05fc0c630d73a486ce2ddcf6b218fd16486b0117 /Source/SPCustomQuery.m
parent6a6142ee4877bce38029da49b45f7177b36aff3a (diff)
downloadsequelpro-2dbac79a1a531a75cc8eaf45e7aa47699f07cfa7.tar.gz
sequelpro-2dbac79a1a531a75cc8eaf45e7aa47699f07cfa7.tar.bz2
sequelpro-2dbac79a1a531a75cc8eaf45e7aa47699f07cfa7.zip
Fix Issue #1527, weird display artifacts when reordering custom query results, in two different ways:
- Preserve the existing scroll rectangle if reloading the view - Update the scroll rect on the main thread when not reloading the view
Diffstat (limited to 'Source/SPCustomQuery.m')
-rw-r--r--Source/SPCustomQuery.m4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/SPCustomQuery.m b/Source/SPCustomQuery.m
index 2db65273..3fac3837 100644
--- a/Source/SPCustomQuery.m
+++ b/Source/SPCustomQuery.m
@@ -588,7 +588,7 @@
// Reset the current table view as necessary to avoid redraw and reload issues.
// Restore the view position to the top left to be within the results for all datasets.
- if(editedRow == -1) {
+ if(editedRow == -1 && !reloadingExistingResult) {
[[customQueryView onMainThread] scrollRowToVisible:0];
[[customQueryView onMainThread] scrollColumnToVisible:0];
}
@@ -884,7 +884,7 @@
// Scroll the viewport to the saved location
selectionViewportToRestore.size = [customQueryView visibleRect].size;
- [customQueryView scrollRectToVisible:selectionViewportToRestore];
+ [[customQueryView onMainThread] scrollRectToVisible:selectionViewportToRestore];
}
//query finished