From 2dbac79a1a531a75cc8eaf45e7aa47699f07cfa7 Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Tue, 22 Jan 2013 01:38:43 +0000 Subject: 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 --- Source/SPCustomQuery.m | 4 ++-- 1 file 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 -- cgit v1.2.3