mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
* Sort setting - catched possible integer parse error.
This commit is contained in:
parent
a38da25f69
commit
724d84c532
1 changed files with 5 additions and 1 deletions
|
|
@ -52,7 +52,11 @@ public abstract class SortSetting {
|
|||
this.prefSortAscending = prefSortAscending;
|
||||
this.prefPilesToggle = prefPilesToggle;
|
||||
this.sortBy = SortBy.getByString(PreferencesDialog.getCachedValue(this.prefSortBy, "Color"));
|
||||
this.sortIndex = Integer.parseInt(PreferencesDialog.getCachedValue(this.prefSortIndex, "1"));
|
||||
try {
|
||||
this.sortIndex = Integer.parseInt(PreferencesDialog.getCachedValue(this.prefSortIndex, "1"));
|
||||
} catch (NumberFormatException e) {
|
||||
this.sortIndex = 2;
|
||||
}
|
||||
this.ascending = PreferencesDialog.getCachedValue(this.prefSortAscending, "1").equals("1");
|
||||
this.pilesToggle = PreferencesDialog.getCachedValue(this.prefPilesToggle, "true").equals("true");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue