View | Details | Raw Unified | Return to bug 246137
Collapse All | Expand All

(-)Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java (+19 lines)
Lines 1473-1478 Link Here
1473
		}	
1473
		}	
1474
	}
1474
	}
1475
	int /*long*/ hItem = 0;
1475
	int /*long*/ hItem = 0;
1476
	int nPos = -1;
1476
	boolean redraw = false;
1477
	boolean redraw = false;
1477
	switch (msg) {
1478
	switch (msg) {
1478
		/* Keyboard messages */
1479
		/* Keyboard messages */
Lines 1520-1525 Link Here
1520
		/* Other messages */
1521
		/* Other messages */
1521
		case OS.WM_SETFONT:
1522
		case OS.WM_SETFONT:
1522
		case OS.WM_TIMER: {
1523
		case OS.WM_TIMER: {
1524
			if (msg == OS.WM_MOUSEWHEEL) {
1525
				SCROLLINFO info = new SCROLLINFO ();
1526
				info.cbSize = SCROLLINFO.sizeof;
1527
				info.fMask = OS.SIF_POS;
1528
				OS.GetScrollInfo (hwnd, OS.SB_VERT, info);
1529
				nPos = info.nPos;
1530
			}
1531
			
1523
			if (findImageControl () != null) {
1532
			if (findImageControl () != null) {
1524
				hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
1533
				hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
1525
			}
1534
			}
Lines 1576-1581 Link Here
1576
		/* Other messages */
1585
		/* Other messages */
1577
		case OS.WM_SETFONT:
1586
		case OS.WM_SETFONT:
1578
		case OS.WM_TIMER: {
1587
		case OS.WM_TIMER: {
1588
			if (msg == OS.WM_MOUSEWHEEL) {
1589
				SCROLLINFO info = new SCROLLINFO ();
1590
				info.cbSize = SCROLLINFO.sizeof;
1591
				info.fMask = OS.SIF_POS;
1592
				OS.GetScrollInfo (hwnd, OS.SB_VERT, info);
1593
				if (nPos == info.nPos) {
1594
					OS.SendMessage (parent.handle, msg, wParam, lParam);
1595
				}
1596
			}
1597
			
1579
			if (findImageControl () != null) {
1598
			if (findImageControl () != null) {
1580
				if (hItem != OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0)) {
1599
				if (hItem != OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0)) {
1581
					OS.InvalidateRect (handle, null, true);
1600
					OS.InvalidateRect (handle, null, true);

Return to bug 246137