summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/GC.java
diff options
context:
space:
mode:
authorSilenio Quarti <silenio>2006-07-19 18:56:04 +0000
committerSilenio Quarti <silenio>2006-07-19 18:56:04 +0000
commit580545d9c214953e6c535678f632f13afcc334d9 (patch)
treef0833cd97eddb3e1ebe0926d3fc63c45ea6c5027 /bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/GC.java
parentf58df6d68408c6f6dce88214c6787a460860ffda (diff)
downloadeclipse.platform.swt-580545d9c214953e6c535678f632f13afcc334d9.tar.gz
eclipse.platform.swt-580545d9c214953e6c535678f632f13afcc334d9.tar.xz
eclipse.platform.swt-580545d9c214953e6c535678f632f13afcc334d9.zip
need to check line style to run away
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/GC.java')
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/GC.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/GC.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/GC.java
index 724bfa5cbd..2e556985ee 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/GC.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/GC.java
@@ -3843,7 +3843,7 @@ public void setLineDash(int[] dashes) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
int[] lineDashes = data.lineDashes;
if (dashes != null && dashes.length > 0) {
- boolean changed = lineDashes == null || lineDashes.length != dashes.length;
+ boolean changed = data.lineStyle != SWT.LINE_CUSTOM || lineDashes == null || lineDashes.length != dashes.length;
for (int i = 0; i < dashes.length; i++) {
int dash = dashes[i];
if (dash <= 0) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
@@ -3854,7 +3854,7 @@ public void setLineDash(int[] dashes) {
System.arraycopy(dashes, 0, data.lineDashes, 0, dashes.length);
data.lineStyle = SWT.LINE_CUSTOM;
} else {
- if (lineDashes == null || lineDashes.length == 0) return;
+ if (data.lineStyle == SWT.LINE_SOLID && (lineDashes == null || lineDashes.length == 0)) return;
data.lineDashes = null;
data.lineStyle = SWT.LINE_SOLID;
}