aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiraj Modi2014-04-30 07:39:01 (EDT)
committerNiraj Modi2014-04-30 07:39:01 (EDT)
commit8438283a725bc5f93b9be3be9ab4375b68555cb2 (patch)
tree2356cacffe3b5c26c6e5035d62d8b4ae54563738
parent2a9647e91a768f63b6d0820bd017a70caebfd276 (diff)
downloadeclipse.platform.swt-8438283a725bc5f93b9be3be9ab4375b68555cb2.zip
eclipse.platform.swt-8438283a725bc5f93b9be3be9ab4375b68555cb2.tar.gz
eclipse.platform.swt-8438283a725bc5f93b9be3be9ab4375b68555cb2.tar.bz2
Change-Id: I5437292a7cce404f354d3b9c4c0ffd506fb6220c Signed-off-by: Niraj Modi <niraj.modi@in.ibm.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java14
1 files changed, 7 insertions, 7 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 143f501..4f53ab7 100644
--- 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
@@ -2864,12 +2864,7 @@ boolean hasChildren () {
boolean hitTestSelection (int index, int x, int y) {
int count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
if (count == 0) return false;
- /*
- * Return when redraw is false & index is 0, to avoid a possible
- * recursion, when user sets ItemHeight during SWT.MeasureItem event
- * processing & with a non-zero table-row selection, refer bug 400174.
- */
- if (!hooks (SWT.MeasureItem) || (!redraw && index == 0)) return false;
+ if (!hooks (SWT.MeasureItem)) return false;
boolean result = false;
if (0 <= index && index < count) {
TableItem item = _getItem (index);
@@ -4676,9 +4671,14 @@ void setItemHeight (boolean fixScroll) {
* visible and are shown afterwards. The fix is to
* save the top index, scroll to the top of the table
* and then restore the original top index.
+ *
+ * Note: Above fix causes recursion when setItemHeight is
+ * called during during SWT.MeasureItem event processing
+ * & with a non-zero table-row selection, bug 400174.
+ * Solution is skip the fix when redraw is false.
*/
int topIndex = getTopIndex ();
- if (fixScroll && topIndex != 0) {
+ if (fixScroll && topIndex != 0 && redraw) {
setRedraw (false);
setTopIndex (0);
}