@@ -2893,7 +2893,22 @@ void CaptureContext::EmbedDependentFiles()
28932893 return ;
28942894
28952895 // Always operate on the capture access (local or remote)
2896- m_Replay.GetCaptureAccess ()->EmbedDependenciesIntoCapture ();
2896+ QString tag = lit (" replayEmbedDependenciesIntoCapture" );
2897+ bool done = false ;
2898+
2899+ Replay ().AsyncInvoke (tag, [this , &done](IReplayController *) {
2900+ m_Replay.GetCaptureAccess ()->EmbedDependenciesIntoCapture ();
2901+ done = true ;
2902+ });
2903+
2904+ // wait a short while before displaying the progress dialog
2905+ for (int i = 0 ; !done && (i < 100 || m_Replay.GetCurrentProcessingTag ().isEmpty () ||
2906+ m_Replay.GetCurrentProcessingTag () == tag);
2907+ i++)
2908+ QThread::msleep (5 );
2909+
2910+ ShowProgressDialog (m_MainWindow->Widget (), tr (" Please wait, working..." ),
2911+ [&done]() { return done; });
28972912
28982913 // Local replay
28992914 if (m_Replay.GetCaptureFile ())
@@ -2923,7 +2938,22 @@ void CaptureContext::RemoveDependentFiles()
29232938 return ;
29242939
29252940 // Always operate on the capture access (local or remote)
2926- m_Replay.GetCaptureAccess ()->RemoveDependenciesFromCapture ();
2941+ QString tag = lit (" replayRemoveDependenciesFromCapture" );
2942+ bool done = false ;
2943+
2944+ Replay ().AsyncInvoke (tag, [this , &done](IReplayController *) {
2945+ m_Replay.GetCaptureAccess ()->RemoveDependenciesFromCapture ();
2946+ done = true ;
2947+ });
2948+
2949+ // wait a short while before displaying the progress dialog
2950+ for (int i = 0 ; !done && (i < 100 || m_Replay.GetCurrentProcessingTag ().isEmpty () ||
2951+ m_Replay.GetCurrentProcessingTag () == tag);
2952+ i++)
2953+ QThread::msleep (5 );
2954+
2955+ ShowProgressDialog (m_MainWindow->Widget (), tr (" Please wait, working..." ),
2956+ [&done]() { return done; });
29272957
29282958 // Local replay
29292959 if (m_Replay.GetCaptureFile ())
0 commit comments