mirror of
https://github.com/haven1433/HexManiacAdvance.git
synced 2026-10-01 12:46:33 -05:00
tile image shouldn't defer loading for small images
This commit is contained in:
@@ -253,7 +253,12 @@ namespace HavenSoft.HexManiac.WPF.Controls {
|
||||
public async void UpdateSource() {
|
||||
var vm = ViewModel;
|
||||
if (vm == null) return;
|
||||
var pixels = await Task.Run(() => vm.PixelData);
|
||||
short[] pixels;
|
||||
if (vm is not BlockMapViewModel) {
|
||||
pixels = vm.PixelData;
|
||||
} else {
|
||||
pixels = await Task.Run(() => vm.PixelData);
|
||||
}
|
||||
if (pixels == null || ViewModel == null) return;
|
||||
if (!UseTrueTransparency) {
|
||||
pixels = ConvertTransparentPixels(pixels);
|
||||
|
||||
Reference in New Issue
Block a user