# HG changeset patch # User Frank Benoit # Date 1204990434 -3600 # Node ID 8ab2f71515ba1dc6efe856c5fe164d88d4449e9d # Parent 4085a50170ab128b28bbb3d90ed04585842eaf21 Fix: strange lines in CTabFolder, index bug because of evaluation order diff -r 4085a50170ab -r 8ab2f71515ba dwt/custom/CTabFolder.d --- a/dwt/custom/CTabFolder.d Sat Mar 08 16:32:38 2008 +0100 +++ b/dwt/custom/CTabFolder.d Sat Mar 08 16:33:54 2008 +0100 @@ -539,7 +539,7 @@ void antialias (int[] shape, RGB lineRGB, RGB innerRGB, RGB outerRGB, GC gc){ // Don't perform anti-aliasing on Mac and WPF because the platform // already does it. The simple style also does not require anti-aliasing. - if (simple || "carbon"==DWT.getPlatform() || "wpf"==DWT.getPlatform()) return; //$NON-NLS-1$ + if (simple || "carbon".equals(DWT.getPlatform()) || "wpf".equals(DWT.getPlatform())) return; //$NON-NLS-1$ // Don't perform anti-aliasing on low resolution displays if (getDisplay().getDepth() < 15) return; if (outerRGB !is null) { @@ -552,8 +552,10 @@ left = onBottom ? oldY <= shape[index+3] : oldY >= shape[index+3]; oldY = shape[index+1]; } - outer[index] = shape[index++] + (left ? -1 : +1); - outer[index] = shape[index++]; + outer[index] = shape[index] + (left ? -1 : +1); + index++; + outer[index] = shape[index]; + index++; } RGB from = lineRGB; RGB to = outerRGB; @@ -575,8 +577,10 @@ left = onBottom ? oldY <= shape[index+3] : oldY >= shape[index+3]; oldY = shape[index+1]; } - inner[index] = shape[index++] + (left ? +1 : -1); - inner[index] = shape[index++]; + inner[index] = shape[index] + (left ? +1 : -1); + index++; + inner[index] = shape[index]; + index++; } RGB from = lineRGB; RGB to = innerRGB; @@ -1316,7 +1320,7 @@ while ((index < length_) && (string[index] !is '&')) index++; if (++index >= length_) return string; if (string[index] !is '&') { - return string[0 .. index-1] ~ string[index .. length_]; + return string.substring(0, index-1) ~ string.substring(index, length_); } index++; } while (index < length_);