Added a constructor for ModelSplitterParams; added a TODO
[Mograsim.git] / plugins / net.mograsim.plugin.core / src / net / mograsim / plugin / tables / mi / RowHighlighter.java
index 03cb37c..3b1aa03 100644 (file)
@@ -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));
                }