image cache is cleared after downloading images. now you won't have to restart magarena if the image cache was set to 'missing image' for a card and you download it

master
wait321 2011-09-30 14:48:14 -07:00
parent 1335bd5ae1
commit 278594ff0a
3 changed files with 9 additions and 0 deletions

View File

@ -23,4 +23,5 @@ public interface CardImagesProvider {
final int index,
final boolean high);
void clearCache();
}

View File

@ -71,4 +71,9 @@ public class HighQualityCardImagesProvider implements CardImagesProvider {
public static CardImagesProvider getInstance() {
return INSTANCE;
}
public void clearCache() {
origImages.clear();
scaledImages.clear();
}
}

View File

@ -172,6 +172,9 @@ public class DownloadImagesDialog extends JDialog implements Runnable,ActionList
}
});
}
// clear images that are set to "missing image" in cache
magic.data.HighQualityCardImagesProvider.getInstance().clearCache();
IconImages.reloadSymbols();