fixed some loading glitches

This commit is contained in:
Rafael 2016-04-06 17:29:08 +02:00
parent 19977bdb32
commit b458850877
2 changed files with 4 additions and 2 deletions

View File

@ -208,6 +208,8 @@ void ProfileInterface::sortingProfileInterface()
ui->vlSavegame->setEnabled(true); ui->vlSavegame->setEnabled(true);
ui->vlSnapmatic->setEnabled(true); ui->vlSnapmatic->setEnabled(true);
qApp->processEvents();
} }
void ProfileInterface::profileLoaded_p() void ProfileInterface::profileLoaded_p()

View File

@ -57,6 +57,7 @@ void ProfileLoader::run()
emit loadingProgress(curFile, maximumV); emit loadingProgress(curFile, maximumV);
foreach(const QString &SavegameFile, SavegameFiles) foreach(const QString &SavegameFile, SavegameFiles)
{ {
emit loadingProgress(curFile, maximumV);
QString sgdPath = profileFolder + "/" + SavegameFile; QString sgdPath = profileFolder + "/" + SavegameFile;
SavegameData *savegame = new SavegameData(sgdPath); SavegameData *savegame = new SavegameData(sgdPath);
if (savegame->readingSavegame()) if (savegame->readingSavegame())
@ -64,10 +65,10 @@ void ProfileLoader::run()
emit savegameLoaded(savegame, sgdPath); emit savegameLoaded(savegame, sgdPath);
} }
curFile++; curFile++;
emit loadingProgress(curFile, maximumV);
} }
foreach(const QString &SnapmaticPic, SnapmaticPics) foreach(const QString &SnapmaticPic, SnapmaticPics)
{ {
emit loadingProgress(curFile, maximumV);
QString picturePath = profileFolder + "/" + SnapmaticPic; QString picturePath = profileFolder + "/" + SnapmaticPic;
SnapmaticPicture *picture = new SnapmaticPicture(picturePath); SnapmaticPicture *picture = new SnapmaticPicture(picturePath);
if (picture->readingPicture()) if (picture->readingPicture())
@ -80,7 +81,6 @@ void ProfileLoader::run()
} }
} }
curFile++; curFile++;
emit loadingProgress(curFile, maximumV);
} }
// adding found crews // adding found crews