mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
unwrap thread's WrappedProgressIndicator when inner indicator is cancelled, same way as we do during registerIndicatorAndRun (IDEA-132931)
This commit is contained in:
+13
-1
@@ -323,7 +323,19 @@ public class ProgressManagerImpl extends ProgressManager implements Disposable {
|
||||
if (threads != null) {
|
||||
for (Thread thread : threads) {
|
||||
ProgressIndicator currentIndicator = getCurrentIndicator(thread);
|
||||
if (currentIndicator == indicator) {
|
||||
boolean underCancelledIndicator = currentIndicator == indicator;
|
||||
|
||||
if (!underCancelledIndicator && currentIndicator instanceof WrappedProgressIndicator) {
|
||||
while(currentIndicator instanceof WrappedProgressIndicator) {
|
||||
ProgressIndicator originalProgressIndicator = ((WrappedProgressIndicator)currentIndicator).getOriginalProgressIndicator();
|
||||
if (originalProgressIndicator == indicator) {
|
||||
underCancelledIndicator = true;
|
||||
break;
|
||||
}
|
||||
currentIndicator = originalProgressIndicator;
|
||||
}
|
||||
}
|
||||
if (underCancelledIndicator) {
|
||||
threadsUnderCanceledIndicator.add(thread);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user