Some minor changes.

This commit is contained in:
LevelX2 2016-10-13 11:40:17 +02:00
parent 6df19bd718
commit 24470a4abf
3 changed files with 8 additions and 6 deletions

View file

@ -1,7 +1,6 @@
XMage.de 1 (Europe/Germany) fast :xmage.de:17171
woogerworks (North America/USA) :xmage.woogerworks.com:17171
XMage Testserver (Europe/France) 1.4.8v0 :176.31.186.181:17171
XMage BR (South America/Brazil) :ec2-54-233-67-0.sa-east-1.compute.amazonaws.com:17171
woogerworks replacment (North America/USA) :158.69.192.238:17171
XMage.tahiti :xmage.tahiti.one:443
Seedds Server (Asia) :115.29.203.80:17171
localhost -> connect to your local server (must be started):localhost:17171

View file

@ -825,8 +825,11 @@ public class DragCardGrid extends JPanel implements DragCardSource, DragCardTarg
// Load separate creatures setting
separateCreatures = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_DECK_EDITOR_LAST_SEPARATE_CREATURES, "false").equals("true");
cardSort = Sort.valueOf(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_DECK_EDITOR_LAST_SORT, Sort.NONE.toString()));
try {
cardSort = Sort.valueOf(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_DECK_EDITOR_LAST_SORT, Sort.NONE.toString()));
} catch (IllegalArgumentException ex) {
cardSort = Sort.NONE;
}
// Sort popup
{
sortPopup = new JPopupMenu();

View file

@ -53,6 +53,7 @@ public class RepositoryUtil {
}
public static long getDatabaseVersion(ConnectionSource connectionSource, String entityName) throws SQLException {
TableUtils.createTableIfNotExists(connectionSource, DatabaseVersion.class);
Dao<DatabaseVersion, Object> dbVersionDao = DaoManager.createDao(connectionSource, DatabaseVersion.class);
QueryBuilder<DatabaseVersion, Object> queryBuilder = dbVersionDao.queryBuilder();
@ -61,9 +62,8 @@ public class RepositoryUtil {
if (dbVersions.isEmpty()) {
return 0;
} else {
return dbVersions.get(0). getVersion();
return dbVersions.get(0).getVersion();
}
}
}