View | Details | Raw Unified | Return to bug 309455
Collapse All | Expand All

(-)src/org/eclipse/jface/viewers/deferred/ConcurrentTableUpdator.java (-4 / +4 lines)
Lines 282-289 Link Here
282
     * @param includeIndex the index that should be included in the visible range.
282
     * @param includeIndex the index that should be included in the visible range.
283
     */
283
     */
284
    public void checkVisibleRange(int includeIndex) {
284
    public void checkVisibleRange(int includeIndex) {
285
        int start = Math.min(table.getTopIndex() - 1, includeIndex);
285
        int start = table.getTopIndex();
286
        int length = Math.max(table.getVisibleItemCount(), includeIndex - start);
286
        int length = table.getVisibleItemCount() - 1;
287
        Range r = lastRange;
287
        Range r = lastRange;
288
288
289
    	if (start != r.start || length != r.length) {
289
    	if (start != r.start || length != r.length) {
Lines 311-317 Link Here
311
311
312
	        // Compute the currently visible range
312
	        // Compute the currently visible range
313
	        int start = Math.min(table.getTopIndex(), knownObjects.length);
313
	        int start = Math.min(table.getTopIndex(), knownObjects.length);
314
	        int length = Math.min(table.getVisibleItemCount(), knownObjects.length - start);
314
	        int length = Math.min(table.getVisibleItemCount() - 1, knownObjects.length - start);
315
	        int itemCount = table.getItemCount();
315
	        int itemCount = table.getItemCount();
316
            
316
            
317
        	int oldStart = lastRange.start;
317
        	int oldStart = lastRange.start;
Lines 328-334 Link Here
328
				int row = idx + oldStart;
328
				int row = idx + oldStart;
329
				
329
				
330
				// If this item is no longer visible
330
				// If this item is no longer visible
331
				if (row < itemCount && (row < start || row >= start + length)) {
331
				if (row < itemCount && (row < start || row > start + length)) {
332
					
332
					
333
					// Note: if we wanted to be really aggressive about clearing
333
					// Note: if we wanted to be really aggressive about clearing
334
					// items that are no longer visible, we could clear here unconditionally.
334
					// items that are no longer visible, we could clear here unconditionally.
(-)src/org/eclipse/jface/viewers/deferred/DeferredContentProvider.java (-1 / +1 lines)
Lines 101-107 Link Here
101
			Rectangle rect = table.getClientArea ();
101
			Rectangle rect = table.getClientArea ();
102
			int itemHeight = table.getItemHeight ();
102
			int itemHeight = table.getItemHeight ();
103
			int headerHeight = table.getHeaderHeight ();
103
			int headerHeight = table.getHeaderHeight ();
104
			return (rect.height - headerHeight + itemHeight - 1) / (itemHeight + table.getGridLineWidth());
104
			return (rect.height - headerHeight + itemHeight - 1) / itemHeight;
105
		}
105
		}
106
		
106
		
107
		/* (non-Javadoc)
107
		/* (non-Javadoc)

Return to bug 309455