Author: jm
Date: 2012-03-15 08:37:51 -0700 (Thu, 15 Mar 2012)
New Revision: 28551
Modified:
core3/impl/trunk/work-swing-impl/impl/src/main/java/org/cytoscape/work/internal/task/JDialogTaskManager.java
Log:
Fixes #740: Clicking cancel on a tunable dialog also cancels the task monitor
Modified:
core3/impl/trunk/work-swing-impl/impl/src/main/java/org/cytoscape/work/internal/task/JDialogTaskManager.java
===================================================================
---
core3/impl/trunk/work-swing-impl/impl/src/main/java/org/cytoscape/work/internal/task/JDialogTaskManager.java
2012-03-15 08:48:52 UTC (rev 28550)
+++
core3/impl/trunk/work-swing-impl/impl/src/main/java/org/cytoscape/work/internal/task/JDialogTaskManager.java
2012-03-15 15:37:51 UTC (rev 28551)
@@ -147,8 +147,10 @@
try {
dialogTunableMutator.setConfigurationContext(parent);
- if ( displayFactoryTunables &&
!displayTunables(factory) )
+ if ( displayFactoryTunables &&
!displayTunables(factory) ) {
+ taskMonitor.cancel();
return;
+ }
taskIterator = factory.createTaskIterator();
taskMonitor.setExpectedNumTasks(
taskIterator.getNumTasks() );
@@ -157,8 +159,10 @@
// We do this outside of the thread so that the task
monitor only gets
// displayed AFTER the first tunables dialog gets
displayed.
first = taskIterator.next();
- if (!displayTunables(first))
+ if (!displayTunables(first)) {
+ taskMonitor.cancel();
return;
+ }
} catch (Exception exception) {
taskIterator = null;
@@ -224,8 +228,10 @@
final Task task = taskIterator.next();
taskMonitor.setTask(task);
- if (!displayTunables(task))
+ if (!displayTunables(task)) {
+ taskMonitor.cancel();
return;
+ }
task.run(taskMonitor);
--
You received this message because you are subscribed to the Google Groups
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/cytoscape-cvs?hl=en.