From b458850877b2d1651f03beee2e1e5b7748249543 Mon Sep 17 00:00:00 2001
From: Rafael <Syping@users.noreply.github.com>
Date: Wed, 6 Apr 2016 17:29:08 +0200
Subject: [PATCH] fixed some loading glitches

---
 ProfileInterface.cpp | 2 ++
 ProfileLoader.cpp    | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/ProfileInterface.cpp b/ProfileInterface.cpp
index 311c4cb..9867fd4 100755
--- a/ProfileInterface.cpp
+++ b/ProfileInterface.cpp
@@ -208,6 +208,8 @@ void ProfileInterface::sortingProfileInterface()
 
     ui->vlSavegame->setEnabled(true);
     ui->vlSnapmatic->setEnabled(true);
+
+    qApp->processEvents();
 }
 
 void ProfileInterface::profileLoaded_p()
diff --git a/ProfileLoader.cpp b/ProfileLoader.cpp
index 43dbdc7..a9ce157 100755
--- a/ProfileLoader.cpp
+++ b/ProfileLoader.cpp
@@ -57,6 +57,7 @@ void ProfileLoader::run()
     emit loadingProgress(curFile, maximumV);
     foreach(const QString &SavegameFile, SavegameFiles)
     {
+        emit loadingProgress(curFile, maximumV);
         QString sgdPath = profileFolder + "/" + SavegameFile;
         SavegameData *savegame = new SavegameData(sgdPath);
         if (savegame->readingSavegame())
@@ -64,10 +65,10 @@ void ProfileLoader::run()
             emit savegameLoaded(savegame, sgdPath);
         }
         curFile++;
-        emit loadingProgress(curFile, maximumV);
     }
     foreach(const QString &SnapmaticPic, SnapmaticPics)
     {
+        emit loadingProgress(curFile, maximumV);
         QString picturePath = profileFolder + "/" + SnapmaticPic;
         SnapmaticPicture *picture = new SnapmaticPicture(picturePath);
         if (picture->readingPicture())
@@ -80,7 +81,6 @@ void ProfileLoader::run()
             }
         }
         curFile++;
-        emit loadingProgress(curFile, maximumV);
     }
 
     // adding found crews