ThreadWithProgressWindows cut each other off


#1

When more than one ThreadWithProgressWindow is running, the latest (frontmost) AlertWindow cuts all others off (cancelling the threads).

The reason is this code. The call to isCurrentlyModal() uses the default parameter value onlyConsiderForemostModalComponent = true, so it returns false: Even though the AlertWindow is still showing, it’s not the frontmost modal component. The thread then gets stopped, even though the window is still showing, and the user hasn’t pressed cancel.

It becomes more misleading when it then calls threadComplete() with userPressedCancel set to true. So you get the cancel result, even though there may not even be a cancel button. I think this needs to be fixed, by simply calling isCurrentlyModal() with onlyConsiderForemostModalComponent = false instead.


#2

Thanks for the fix, I’ll push something shortly.

EDIT:


#3

Thanks! :slight_smile: