Changeset 1872 in josm for trunk/src/org/openstreetmap/josm/gui
- Timestamp:
- 2009-07-30T08:40:34+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/progress/AbstractProgressMonitor.java
r1812 r1872 19 19 String extraText; 20 20 Boolean intermediate; 21 22 boolean finishRequested; 21 23 } 22 24 … … 86 88 87 89 if (state == State.IN_SUBTASK) { 88 // Make sure the subtask didn't start yet (once task start it must be finished) 89 boolean broken = currentChild.state != State.INIT; 90 for (Request request:requests) { 91 broken = broken | request.originator.state != State.INIT; 92 } 93 if (broken) { 94 throw new ProgressException("Cannot call finishTask when there are unfinished tasks"); 95 } else { 96 state = State.IN_TASK; 97 } 98 } 99 100 checkState(State.IN_TASK); 101 state = State.FINISHED; 102 doFinishTask(); 90 requestedState.finishRequested = true; 91 } else { 92 checkState(State.IN_TASK); 93 state = State.FINISHED; 94 doFinishTask(); 95 } 103 96 } 104 97 } … … 282 275 283 276 private void applyThisRequest(Request request) { 284 if (request.customText != null) { 285 this.customText = request.customText; 286 } 287 288 if (request.title != null) { 289 this.taskTitle = request.title; 290 } 291 292 if (request.intermediate != null) { 293 this.intermediateTask = request.intermediate; 294 } 295 296 if (request.extraText != null) { 297 this.extraText = request.extraText; 298 } 299 300 resetState(); 277 if (request.finishRequested) { 278 finishTask(); 279 } else { 280 if (request.customText != null) { 281 this.customText = request.customText; 282 } 283 284 if (request.title != null) { 285 this.taskTitle = request.title; 286 } 287 288 if (request.intermediate != null) { 289 this.intermediateTask = request.intermediate; 290 } 291 292 if (request.extraText != null) { 293 this.extraText = request.extraText; 294 } 295 296 resetState(); 297 } 301 298 } 302 299
Note:
See TracChangeset
for help on using the changeset viewer.