diff options
author | Steve Northover <steve> | 2006-02-11 02:30:28 +0000 |
---|---|---|
committer | Steve Northover <steve> | 2006-02-11 02:30:28 +0000 |
commit | 2c011238915b3c2cfc48cac4dfd07fecacb3dd90 (patch) | |
tree | 46cd63c81caf67255e57a655e0d81507753e80eb | |
parent | 02d745a32b10a8f685d12785397c35d7fec9a725 (diff) | |
download | eclipse.platform.swt-2c011238915b3c2cfc48cac4dfd07fecacb3dd90.tar.gz eclipse.platform.swt-2c011238915b3c2cfc48cac4dfd07fecacb3dd90.tar.xz eclipse.platform.swt-2c011238915b3c2cfc48cac4dfd07fecacb3dd90.zip |
only do custom draw when the table or tree is visible
-rwxr-xr-x | bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java | 8 | ||||
-rwxr-xr-x | bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java | 4 |
2 files changed, 3 insertions, 9 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java index 738f856276..5a56761aba 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java @@ -4591,9 +4591,7 @@ LRESULT wmNotifyChild (int wParam, int lParam) { OS.MoveMemory (nmcd, lParam, NMLVCUSTOMDRAW.sizeof); switch (nmcd.dwDrawStage) { case OS.CDDS_PREPAINT: { -// if (drawCount != 0 || !OS.IsWindowVisible (handle)) { -// if (!OS.IsWinCE && OS.WindowFromDC (nmcd.hdc) == handle) break; -// } + if (drawCount != 0 || !OS.IsWindowVisible (handle)) break; if (OS.IsWindowEnabled (handle)) { Control control = findBackgroundControl (); if (control != null && control.backgroundImage != null) { @@ -4651,9 +4649,7 @@ LRESULT wmNotifyChild (int wParam, int lParam) { } } if (!ignoreItemHeight) { - if (event.height > getItemHeight ()) { - setItemHeight (event.height); - } + if (event.height > getItemHeight ()) setItemHeight (event.height); ignoreItemHeight = true; } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java index 55b792261d..6f00698654 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java @@ -4706,9 +4706,7 @@ LRESULT wmNotifyChild (int wParam, int lParam) { OS.MoveMemory (nmcd, lParam, NMTVCUSTOMDRAW.sizeof); switch (nmcd.dwDrawStage) { case OS.CDDS_PREPAINT: { -// if (drawCount != 0 || !OS.IsWindowVisible (handle)) { -// if (!OS.IsWinCE && OS.WindowFromDC (nmcd.hdc) == handle) break; -// } + if (drawCount != 0 || !OS.IsWindowVisible (handle)) break; return new LRESULT (OS.CDRF_NOTIFYITEMDRAW | OS.CDRF_NOTIFYPOSTPAINT); } case OS.CDDS_POSTPAINT: { |