Skip to content

Commit e7b8bb3

Browse files
author
eric@ericaro.net
committed
fixed interruption issue
git-svn-id: https://surfaceplotter.googlecode.com/svn/trunk@189 3e6e6ddc-beec-11de-8ec6-755e00613368
1 parent f3af37c commit e7b8bb3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

surfaceplotter/src/main/java/net/ericaro/surfaceplotter/ProgressiveSurfaceModel.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ protected Void doInBackground() throws Exception {
6161
while (maxDefinition > availableDefinition) {
6262
increaseDefinition();
6363
// Thread.sleep(1000);
64+
if (isCancelled()) return null;
6465
publish();
6566
}
6667
setProgress(100);
@@ -87,6 +88,7 @@ private void increaseDefinition() throws Exception{
8788
for (int i = 0; i < k; i++)
8889
for (int j = 0; j < k; j++)
8990
if (definition(i, j) == def){
91+
if (isCancelled()) return;
9092
compute(i, j);
9193
setProgress(( ci++ *100 )/ max ) ;
9294
}

0 commit comments

Comments
 (0)