Mercurial > projects > dwt-addons
diff dwtx/jface/viewers/AbstractTableViewer.d @ 70:46a6e0e6ccd4
Merge with d-fied sources of 3.4M7
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Thu, 22 May 2008 01:36:46 +0200 |
parents | ea8ff534f622 |
children | 7ffeace6c47f |
line wrap: on
line diff
--- a/dwtx/jface/viewers/AbstractTableViewer.d Mon May 19 13:41:06 2008 +0200 +++ b/dwtx/jface/viewers/AbstractTableViewer.d Thu May 22 01:36:46 2008 +0200 @@ -8,7 +8,7 @@ * Contributors: * IBM Corporation - initial API and implementation * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation bug 154329 - * - fixes in bug 170381, 198665 + * - fixes in bug 170381, 198665, 200731 * Port to the D programming language: * Frank Benoit <benoit@tionex.de> *******************************************************************************/ @@ -257,7 +257,7 @@ */ public void add(Object[] elements) { assertElementsNotNull(elements); - if (isBusy()) + if (checkBusy()) return; Object[] filtered = filter(elements); @@ -357,8 +357,8 @@ * java.lang.Object, bool) */ protected override void doUpdateItem(Widget widget, Object element, bool fullMap) { - bool oldBusy = busy; - busy = true; + bool oldBusy = isBusy(); + setBusy(true); try { if ( auto item = cast(Item)widget ) { @@ -415,7 +415,7 @@ } } finally { - busy = oldBusy; + setBusy(oldBusy); } } @@ -622,7 +622,7 @@ if (position is -1) { position = doGetItemCount(); } - if (isBusy()) + if (checkBusy()) return; createItem(element, position); } @@ -768,12 +768,12 @@ Object input = getInput(); for (int i = 0; i < elements.length; ++i) { if (opEquals(elements[i], input)) { - bool oldBusy = busy; - busy = false; + bool oldBusy = isBusy(); + setBusy(false); try { setInput(null); } finally { - busy = oldBusy; + setBusy(oldBusy); } return; } @@ -823,7 +823,7 @@ */ public void remove( Object[] elements) { assertElementsNotNull(elements); - if (isBusy()) + if (checkBusy()) return; if (elements.length is 0) { return; @@ -1000,7 +1000,8 @@ if (count < size) { System.arraycopy(indices, 0, indices = new int[count], 0, count); } - doSetSelection(indices); + doDeselectAll(); + doSelect(indices); if (reveal && firstItem !is null) { doShowItem(firstItem); @@ -1016,7 +1017,7 @@ * @since 3.1 */ public void setItemCount(int count) { - if (isBusy()) + if (checkBusy()) return; int oldCount = doGetItemCount(); if (count < oldCount) { @@ -1048,7 +1049,7 @@ * @since 3.1 */ public void replace(Object element, int index) { - if (isBusy()) + if (checkBusy()) return; Item item = doGetItem(index); refreshItem(item, element);