fix bug in slideshow cycling

This commit is contained in:
jmillman 2014-09-05 14:02:07 -04:00
parent bfc4f8498d
commit c116ab5b58

View File

@ -270,7 +270,7 @@ public class SlideShowView extends SingleDrawableViewBase implements TagUtils.Ta
if (fileID != null) { if (fileID != null) {
int index = groupPane.getGrouping().fileIds().indexOf(fileID); int index = groupPane.getGrouping().fileIds().indexOf(fileID);
final int size = groupPane.getGrouping().fileIds().size(); final int size = groupPane.getGrouping().fileIds().size();
index += d; index = (index + d) % size;
if (index < 0) { if (index < 0) {
index += size; index += size;
} }
@ -283,7 +283,7 @@ public class SlideShowView extends SingleDrawableViewBase implements TagUtils.Ta
/** /**
* @return supplemental text to include in the label, specifically: "image x * @return supplemental text to include in the label, specifically: "image x
* of y" * of y"
*/ */
private String getSupplementalText() { private String getSupplementalText() {
return " ( " + (groupPane.getGrouping().fileIds().indexOf(fileID) + 1) + " of " + groupPane.getGrouping().fileIds().size() + " in group )"; return " ( " + (groupPane.getGrouping().fileIds().indexOf(fileID) + 1) + " of " + groupPane.getGrouping().fileIds().size() + " in group )";