mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
* UI: fixed error in card viewer while viewing pages with tokens;
This commit is contained in:
parent
3877d2267a
commit
a74fb36053
1 changed files with 2 additions and 2 deletions
|
@ -695,13 +695,13 @@ public class MageBook extends JComponent {
|
|||
int totalTokensEmblems = totalTokens + getTotalNumEmblems(set);
|
||||
int start = 0;
|
||||
if (!(page * conf.CARDS_PER_PAGE <= totalTokensEmblems && (page + 1) * conf.CARDS_PER_PAGE >= totalTokensEmblems)) {
|
||||
start = page * conf.CARDS_PER_PAGE - totalTokensEmblems;
|
||||
start = Math.max(0, page * conf.CARDS_PER_PAGE - totalTokensEmblems);
|
||||
pageRight.setVisible(true);
|
||||
}
|
||||
|
||||
int end = planes.size();
|
||||
if ((page + 1) * conf.CARDS_PER_PAGE < totalTokensEmblems + planes.size()) {
|
||||
end = (page + 1) * conf.CARDS_PER_PAGE - totalTokensEmblems;
|
||||
end = Math.max(0, (page + 1) * conf.CARDS_PER_PAGE - totalTokensEmblems);
|
||||
pageRight.setVisible(true);
|
||||
} else {
|
||||
pageRight.setVisible(false);
|
||||
|
|
Loading…
Reference in a new issue