Skip to content

Commit

Permalink
Fix SaveImage
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyAnsel committed May 25, 2023
1 parent a0ab0c0 commit 90df8f2
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions XwaDatEditor/XwaDatEditor/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -844,9 +844,18 @@ private void SaveImage_Click(object sender, RoutedEventArgs e)

this.RunBusyAction(disp =>
{
foreach (DatImage img in images)
if (images.Count == 1)
{
img.Save(directory + '\\' + img.GroupId + "-" + img.ImageId + extension);
image.Save(fileName);
}
else
{
string name = System.IO.Path.GetFileNameWithoutExtension(fileName);

foreach (DatImage img in images)
{
img.Save(directory + '\\' + name + "-" + img.GroupId + "-" + img.ImageId + extension);
}
}
});
}
Expand Down

0 comments on commit 90df8f2

Please sign in to comment.