mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-03 22:35:43 +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:
parent
e32b10f6f3
commit
62de603571
1 changed files with 4 additions and 4 deletions
|
@ -190,10 +190,10 @@ public class SystemCommandsView extends SystemTableView implements ISystemThemeC
|
|||
}
|
||||
}
|
||||
}
|
||||
if (index > 0)
|
||||
{
|
||||
table.setTopIndex(index - 1);
|
||||
}
|
||||
int y = table.getSize().y;
|
||||
int h = table.getItemHeight();
|
||||
int n = y / h - 1;
|
||||
table.setTopIndex(Math.max(0, index - n));
|
||||
}
|
||||
}
|
||||
if (needsLayout)
|
||||
|
|
Loading…
Add table
Reference in a new issue