diff --git a/src/main/java/se/lantz/PCUAEManager.java b/src/main/java/se/lantz/PCUAEManager.java index 8d698dd..7d4cb29 100644 --- a/src/main/java/se/lantz/PCUAEManager.java +++ b/src/main/java/se/lantz/PCUAEManager.java @@ -54,9 +54,9 @@ public class PCUAEManager mainWindow.setSize(Math.min(width, 1500), Math.min(height - 40, 825)); mainWindow.setMinimumSize(new Dimension(Math.min(width, 1300), Math.min(height - 40, 700))); - mainWindow.setVisible(true); mainWindow.setLocationRelativeTo(null); mainWindow.initialize(); + mainWindow.setVisible(true); //Make sure all folders are available try diff --git a/src/main/java/se/lantz/gui/MenuManager.java b/src/main/java/se/lantz/gui/MenuManager.java index 97deeac..da7bf4d 100644 --- a/src/main/java/se/lantz/gui/MenuManager.java +++ b/src/main/java/se/lantz/gui/MenuManager.java @@ -1,5 +1,6 @@ package se.lantz.gui; +import java.awt.Cursor; import java.awt.Desktop; import java.awt.event.InputEvent; import java.awt.event.KeyEvent; @@ -1243,9 +1244,11 @@ public class MenuManager private void reloadAll() { + this.mainWindow.setWaitCursor(true); //Refresh game views uiModel.reloadGameViews(); this.mainWindow.refreshMenuAndUI(); + this.mainWindow.setWaitCursor(false); } private void backupDb() diff --git a/src/main/java/se/lantz/model/MainViewModel.java b/src/main/java/se/lantz/model/MainViewModel.java index 8123ba0..1bc0c82 100644 --- a/src/main/java/se/lantz/model/MainViewModel.java +++ b/src/main/java/se/lantz/model/MainViewModel.java @@ -219,15 +219,16 @@ public class MainViewModel extends AbstractModel for (GameView gameView : gameViewList) { gameViewModel.addElement(gameView); + //Select each gameview to load all games so that the game count is shown directly (may be a performance issue?) + gameViewModel.setSelectedItem(gameView); } + gameViewModel.setSelectedItem(allGameView); } public void reloadGameViews() { - this.disableChangeNotification(true); gameViewModel.removeAllElements(); setupGameViews(); - this.disableChangeNotification(false); } public GameListModel getGameListModel() @@ -495,7 +496,7 @@ public class MainViewModel extends AbstractModel this.disableChangeNotification(false); logger.debug("...done."); } - + public int getFileCount(List gamesList) { int fileCount = 0; @@ -755,7 +756,7 @@ public class MainViewModel extends AbstractModel //Reload the current view reloadCurrentGameView(); } - + public void deleteAllGameListViews() { dbConnector.deleteAllGameListViews(); @@ -957,7 +958,7 @@ public class MainViewModel extends AbstractModel { favorites10Count = toggleFavorite(data, 10, favorites10Count, favorites10View); } - + public void setViewTag(GameListData data, String viewTag) { if (data != null && !data.getGameId().isEmpty()) @@ -1012,12 +1013,12 @@ public class MainViewModel extends AbstractModel { dbConnector.resetJoystickConfigsForView(getSelectedGameView()); } - + public void enableAccurateDiskForAllGamesInCurrentView() { dbConnector.setAccurateDiskForView(getSelectedGameView(), true); } - + public void disableAccurateDiskForAllGamesInCurrentView() { dbConnector.setAccurateDiskForView(getSelectedGameView(), false);