1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-08-13 17:03:45 -04:00

delettion of rows in sfv table improved

This commit is contained in:
Reinhard Pointner 2007-12-26 20:43:58 +00:00
parent 8360ed0c69
commit 69f549c3b7
2 changed files with 13 additions and 2 deletions

View File

@ -180,6 +180,9 @@ public class ChecksumComputationExecutor {
adjustPoolSize();
fireRemainingTaskCountChange();
fireActiveSessionTaskCountChange();
if (executor.getActiveCount() == 0) {
setActive(false);
}
@ -187,6 +190,12 @@ public class ChecksumComputationExecutor {
}
public void purge() {
executor.purge();
fireActiveSessionTaskCountChange();
}
public void addPropertyChangeListener(PropertyChangeListener listener) {
propertyChangeSupport.addPropertyChangeListener(listener);
}

View File

@ -136,13 +136,15 @@ public class SfvTableModel extends AbstractTableModel {
ChecksumRow row = rows.get(i);
rowsToRemove.add(rows.get(i));
for (File columnRoot : checksumColumnRoots) {
row.getChecksum(columnRoot).cancelComputationTask();
for (Checksum checksum : row.getChecksums()) {
checksum.cancelComputationTask();
}
}
rows.removeAll(rowsToRemove);
fireTableRowsDeleted(rowIndices[0], rowIndices[rowIndices.length - 1]);
ChecksumComputationExecutor.getInstance().purge();
}