Related #7173: LibraryEditor: Do not save file with empty name

This commit is contained in:
Aleksandr Pikalev 2015-11-29 18:20:18 +03:00 committed by Daniel Marjamäki
parent 4fa888ec44
commit e9b84a4f06
1 changed files with 3 additions and 0 deletions

View File

@ -143,6 +143,9 @@ void LibraryDialog::saveCfgAs()
tr("Save the library as"), tr("Save the library as"),
path, path,
filter); filter);
if (selectedFile.isEmpty())
return;
if (!selectedFile.endsWith(".cfg", Qt::CaseInsensitive)) if (!selectedFile.endsWith(".cfg", Qt::CaseInsensitive))
selectedFile += ".cfg"; selectedFile += ".cfg";