X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=plugins%2Fnet.mograsim.plugin.core%2Fsrc%2Fnet%2Fmograsim%2Fplugin%2Ftables%2Fmi%2FRowHighlighter.java;h=3b1aa0384204e234060eb2d0d35d164ba6247f4b;hb=648fc6e69e09fe4467cb6bac47934be1a7dcf0d6;hp=03cb37cc4ba7e0762d1d8322f3fdccddabc62277;hpb=0eb525202d3c871a2a20f789af1728248f3cff11;p=Mograsim.git diff --git a/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/tables/mi/RowHighlighter.java b/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/tables/mi/RowHighlighter.java index 03cb37cc..3b1aa038 100644 --- a/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/tables/mi/RowHighlighter.java +++ b/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/tables/mi/RowHighlighter.java @@ -11,10 +11,10 @@ public class RowHighlighter { private int highlighted = -1; private LazyTableViewer viewer; - private ColorProvider cProv; + private FontAndColorHelper cProv; private SingleSWTRequest requester = new SingleSWTRequest(); - public RowHighlighter(LazyTableViewer viewer, ColorProvider cProv) + public RowHighlighter(LazyTableViewer viewer, FontAndColorHelper cProv) { this.viewer = viewer; this.cProv = cProv; @@ -35,7 +35,7 @@ public class RowHighlighter cProv.highlight(row); if (row != -1) { - table.showItem(table.getItem(Math.min(table.getItemCount(), row + 2))); + table.showItem(table.getItem(Math.min(table.getItemCount() - 1, row + 2))); table.showItem(table.getItem(row)); Optional.ofNullable(table.getItem(row).getData()).ifPresent(d -> viewer.update(d, null)); }