fix: bug fixes

This commit is contained in:
lantzelot-swe 2021-04-13 23:01:34 +02:00
parent b6babab332
commit 9f2b45b8de
3 changed files with 9 additions and 8 deletions

View File

@ -513,8 +513,9 @@ public class MenuManager
CarouselImportWorker worker = new CarouselImportWorker(importManager, dialog);
worker.execute();
dialog.setVisible(true);
//Refresh current game view after import
uiModel.reloadCurrentGameView();
//Refresh game views after import
uiModel.reloadGameViews();
MainWindow.getInstance().selectViewAfterRestore();
MainWindow.getInstance().repaintAfterModifications();
}
}
@ -536,8 +537,9 @@ public class MenuManager
GamebaseImportWorker worker = new GamebaseImportWorker(gamebaseImporter, importManager, dialog);
worker.execute();
dialog.setVisible(true);
//Refresh current game view after import
uiModel.reloadCurrentGameView();
//Refresh game views after import
uiModel.reloadGameViews();
MainWindow.getInstance().selectViewAfterRestore();
MainWindow.getInstance().repaintAfterModifications();
}
else

View File

@ -527,7 +527,7 @@ public class MainViewModel extends AbstractModel
for (int i = 0; i < getGameListModel().getSize(); i++)
{
GameListData currentData = getGameListModel().getElementAt(i);
if (!currentData.getTitle().contains("THEC64"))
if (!currentData.getTitle().contains("THEC64") || currentData.getTitle().contains("VIC20"))
{
GameDetails details = dbConnector.getGameDetails(currentData.getGameId());
FileManager.deleteFilesForGame(details);

View File

@ -1149,7 +1149,7 @@ public class FileManager
String fileName = ze.getName();
File newFile = new File(unzippedBasePath + fileName);
//create directories for sub directories in zip
new File(newFile.getParentFile().getParent()).mkdirs();
new File(newFile.getParent()).mkdirs();
FileOutputStream fos = new FileOutputStream(newFile);
int len;
while ((len = zis.read(buffer)) > 0)
@ -1183,8 +1183,7 @@ public class FileManager
{
File fileEntry = new File(unzippedBasePath + fh.getFileNameString().trim());
//create directories for sub directories in rar
new File(fileEntry.getParentFile().getParent()).mkdirs();
new File(fileEntry.getParent()).mkdirs();
FileOutputStream os = new FileOutputStream(fileEntry);
archive.extractFile(fh, os);