return;
}
- /*
- * TODO This will break the logical index calculation, as it will
- * try to search for non-
- */
- getLogger().warning(
- "[[spacers]] scrolling and spacers near the bottom");
-
boolean rowsWereMoved = false;
final double topElementPosition;
aRowWasLeftBehind = true;
}
+ /*
+ * Make sure we don't scroll beyond the row content. This can
+ * happen if we have spacers for the last rows.
+ */
+ rowsToMove = Math.max(0,
+ Math.min(rowsToMove, getRowCount() - logicalRowIndex));
+
moveAndUpdateEscalatorRows(Range.between(0, rowsToMove),
targetVisualIndex, logicalRowIndex);
createSpacersMenuForRow(1, menupath);
createSpacersMenuForRow(50, menupath);
+ createSpacersMenuForRow(99, menupath);
}
private void createSpacersMenuForRow(final int rowIndex, String[] menupath) {