diff options
author | Julian Murgia - StraToN <the.straton@gmail.com> | 2015-12-04 19:29:27 +0100 |
---|---|---|
committer | Julian Murgia - StraToN <the.straton@gmail.com> | 2015-12-04 19:29:27 +0100 |
commit | 6ffe1fff2df61a0b6648eea673bd693ea60c85ef (patch) | |
tree | a01c18bbd0b9b8a6619e9e9845849bb21d2dab93 /tools/editor | |
parent | 5b0dcab3e85a4b2147ec23a06f7845246f8cb538 (diff) |
Set default destination filename of imported font to be input font filename
if destination filename was ".fnt" (ie. no filename set by user)
Diffstat (limited to 'tools/editor')
-rw-r--r-- | tools/editor/io_plugins/editor_font_import_plugin.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/editor/io_plugins/editor_font_import_plugin.cpp b/tools/editor/io_plugins/editor_font_import_plugin.cpp index 10a3877529..5ba0669f1d 100644 --- a/tools/editor/io_plugins/editor_font_import_plugin.cpp +++ b/tools/editor/io_plugins/editor_font_import_plugin.cpp @@ -520,6 +520,10 @@ class EditorFontImportDialog : public ConfirmationDialog { 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(); if (rimd.is_null()) { |