MIDI import: call qApp->processEvents(); before creating tracks

This should keep LMMS responsive from the window managers POV, unless
the user selects a huge enough default sound font that loading it
takes too long.
This commit is contained in:
Raine M. Ekman
2015-04-25 10:12:02 +03:00
parent 61ab0ed093
commit 06d87174e4

View File

@@ -160,6 +160,7 @@ public:
{
if( !at )
{
qApp->processEvents();
at = dynamic_cast<AutomationTrack *>( Track::create( Track::AutomationTrack, tc ) );
}
if( tn != "") {
@@ -223,6 +224,7 @@ public:
smfMidiChannel * create( TrackContainer* tc, QString tn )
{
if( !it ) {
qApp->processEvents();
it = dynamic_cast<InstrumentTrack *>( Track::create( Track::InstrumentTrack, tc ) );
#ifdef LMMS_HAVE_FLUIDSYNTH