mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-30 02:50:05 +00:00
This commit is contained in:
parent
08e0f81b54
commit
336f5fa85c
2 changed files with 7 additions and 1 deletions
|
|
@ -66,7 +66,10 @@ bool ThreadWithProgressWindow::runThread (const int priority)
|
|||
startThread (priority);
|
||||
startTimer (100);
|
||||
|
||||
alertWindow.setMessage (message);
|
||||
{
|
||||
const ScopedLock sl (messageLock);
|
||||
alertWindow.setMessage (message);
|
||||
}
|
||||
|
||||
const bool wasCancelled = alertWindow.runModalLoop() != 0;
|
||||
|
||||
|
|
@ -84,6 +87,7 @@ void ThreadWithProgressWindow::setProgress (const double newProgress)
|
|||
|
||||
void ThreadWithProgressWindow::setStatusMessage (const String& newStatusMessage)
|
||||
{
|
||||
const ScopedLock sl (messageLock);
|
||||
message = newStatusMessage;
|
||||
}
|
||||
|
||||
|
|
@ -97,6 +101,7 @@ void ThreadWithProgressWindow::timerCallback()
|
|||
}
|
||||
else
|
||||
{
|
||||
const ScopedLock sl (messageLock);
|
||||
alertWindow.setMessage (message);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -155,6 +155,7 @@ private:
|
|||
double progress;
|
||||
AlertWindow alertWindow;
|
||||
String message;
|
||||
CriticalSection messageLock;
|
||||
const int timeOutMsWhenCancelling;
|
||||
|
||||
ThreadWithProgressWindow (const ThreadWithProgressWindow&);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue