Set default destination filename of imported font to be input font filename

if destination filename was ".fnt" (ie. no filename set by user)
This commit is contained in:
Julian Murgia - StraToN 2015-12-04 19:29:27 +01:00
parent 5b0dcab3e8
commit 6ffe1fff2d

View file

@ -520,6 +520,10 @@ class EditorFontImportDialog : public ConfirmationDialog {
return; return;
} }
if (dest->get_line_edit()->get_text().get_file()==".fnt") {
dest->get_line_edit()->set_text(dest->get_line_edit()->get_text().get_base_dir() + "/" + source->get_line_edit()->get_text().get_file().basename() + ".fnt" );
}
Ref<ResourceImportMetadata> rimd = get_rimd(); Ref<ResourceImportMetadata> rimd = get_rimd();
if (rimd.is_null()) { if (rimd.is_null()) {