1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-05 15:25:49 +02:00

Bug 142067 - fixed calculation of the index of the table item that lives at the top row of the table.

This commit is contained in:
David Dykstal 2006-11-06 23:34:21 +00:00
parent e32b10f6f3
commit 62de603571

View file

@ -190,10 +190,10 @@ public class SystemCommandsView extends SystemTableView implements ISystemThemeC
} }
} }
} }
if (index > 0) int y = table.getSize().y;
{ int h = table.getItemHeight();
table.setTopIndex(index - 1); int n = y / h - 1;
} table.setTopIndex(Math.max(0, index - n));
} }
} }
if (needsLayout) if (needsLayout)