Skip to content

Commit 93a562c

Browse files
committed
fix doubled file extension on image import when sprites.json doesn't exist
1 parent 16c8349 commit 93a562c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Gui/ViewModels/SubObjectTypes/ImageTableViewModel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,10 +324,10 @@ public async Task ImportImages(string directory)
324324
var sanitised = files.Select(TrimZeroes).ToList();
325325

326326
offsets = [.. ImageViewModels
327-
.Select((x, i) => new GraphicsElementJson($"{sanitised[i]}.png", (short)x.XOffset, (short)x.YOffset))
327+
.Select((x, i) => new GraphicsElementJson(sanitised[i], (short)x.XOffset, (short)x.YOffset))
328328
.Fill(files.Length, GraphicsElementJson.Zero)];
329329

330-
Logger.Debug($"Didn't find sprites.json file, using existing G1Element32 offsets with {offsets.Count} images");
330+
Logger.Debug($"Didn't find sprites.json file, using existing GraphicsElement offsets with {offsets.Count} images");
331331
}
332332

333333
// clear existing images

0 commit comments

Comments
 (0)