summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Jonsson <spamatica@gmail.com>2010-12-27 23:44:14 +0000
committerRobert Jonsson <spamatica@gmail.com>2010-12-27 23:44:14 +0000
commitd849feb0672d27243dc7c958bfc6b341cf6f9264 (patch)
tree6c5034c3d789b55649a7687860f8ded1c0eef20a
parent7370c2468b14db695398713206b0b2fc4a5cbb97 (diff)
load project sync tweaks
-rw-r--r--muse2/ChangeLog3
-rw-r--r--muse2/muse/app.cpp9
2 files changed, 10 insertions, 2 deletions
diff --git a/muse2/ChangeLog b/muse2/ChangeLog
index 9c621d00..a9362449 100644
--- a/muse2/ChangeLog
+++ b/muse2/ChangeLog
@@ -1,3 +1,6 @@
+28.12.2010:
+ - Tweaked and added some delays during project load to counter threading
+ issues during loading of projects (rj)
27.12.2010:
- Added a first try at project creation dialog, we'll see how much territory
it covers, intentionally it's only used upon creation of a project, later 'Save As'
diff --git a/muse2/muse/app.cpp b/muse2/muse/app.cpp
index 596c4f19..c2202e7a 100644
--- a/muse2/muse/app.cpp
+++ b/muse2/muse/app.cpp
@@ -1628,6 +1628,7 @@ void MusE::loadProjectFile(const QString& name)
void MusE::loadProjectFile(const QString& name, bool songTemplate, bool loadAll)
{
+ QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
//
// stop audio threads if running
//
@@ -1640,14 +1641,15 @@ void MusE::loadProjectFile(const QString& name, bool songTemplate, bool loadAll)
}
seqStop();
}
- microSleep(200000);
+ microSleep(100000);
loadProjectFile1(name, songTemplate, loadAll);
- microSleep(200000);
+ microSleep(100000);
if (restartSequencer)
seqStart();
if (song->getSongInfo().length()>0)
startSongInfo(false);
+ QApplication::restoreOverrideCursor();
}
//---------------------------------------------------------
@@ -4446,6 +4448,7 @@ bool MusE::clearSong()
while (audio->isPlaying())
qApp->processEvents();
}
+ microSleep(100000);
again:
for (iToplevel i = toplevels.begin(); i != toplevels.end(); ++i) {
@@ -4465,7 +4468,9 @@ again:
goto again;
}
}
+ microSleep(100000);
song->clear(false);
+ microSleep(100000);
return false;
}