form steve yorkshire: mat editor save extension fix

This commit is contained in:
AzaezelX 2021-04-11 19:57:31 -05:00
parent b6a1acabf8
commit fadafbfa1b

View file

@ -2551,7 +2551,7 @@ function MaterialEditorGui::saveCompositeMap(%this)
%saveAs = ""; %saveAs = "";
%dlg = new SaveFileDialog() %dlg = new SaveFileDialog()
{ {
Filters = "png"; Filters = "PNG File (*.png)|*.png|";
DefaultPath = EditorSettings.value("data/"); DefaultPath = EditorSettings.value("data/");
ChangePath = false; ChangePath = false;
OverwritePrompt = true; OverwritePrompt = true;
@ -2565,6 +2565,9 @@ function MaterialEditorGui::saveCompositeMap(%this)
%saveAs = %dlg.FileName; %saveAs = %dlg.FileName;
} }
if( fileExt( %saveAs ) !$= ".png" )
%saveAs = %saveAs @ ".png";
%material = %this.currentMaterial; %material = %this.currentMaterial;
%layer = %this.currentLayer; %layer = %this.currentLayer;