From 06d87174e4b0a83de243f3a1ebdb6ebcd323c327 Mon Sep 17 00:00:00 2001 From: "Raine M. Ekman" Date: Sat, 25 Apr 2015 10:12:02 +0300 Subject: [PATCH] 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. --- plugins/MidiImport/MidiImport.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/MidiImport/MidiImport.cpp b/plugins/MidiImport/MidiImport.cpp index 004c33957..4e4a03529 100644 --- a/plugins/MidiImport/MidiImport.cpp +++ b/plugins/MidiImport/MidiImport.cpp @@ -160,6 +160,7 @@ public: { if( !at ) { + qApp->processEvents(); at = dynamic_cast( 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( Track::create( Track::InstrumentTrack, tc ) ); #ifdef LMMS_HAVE_FLUIDSYNTH