misc: throw internal image extension behind a preference setting

This commit is contained in:
Brendan Hagan
2022-07-04 01:57:32 -04:00
parent 386e5ba4a4
commit 95fdaa776c
5 changed files with 24 additions and 12 deletions
+1 -1
View File
@@ -49,7 +49,7 @@ void ImageValueEditor::sliceImage(const Image& image) {
// clicked ok?
if (s.ShowModal() == wxID_OK) {
// store the image into the set
LocalFileName new_image_file = getLocalPackage().newFileName(field().name,_(".png")); // a new unique name in the package
LocalFileName new_image_file = getLocalPackage().newFileName(field().name, settings.internal_image_extension ? _(".png") : _("")); // a new unique name in the package
Image img = s.getImage();
img.SaveFile(getLocalPackage().nameOut(new_image_file), wxBITMAP_TYPE_PNG); // always use PNG images, see #69. Disk space is cheap anyway.
addAction(value_action(valueP(), new_image_file));