Show error message if save option used without a file name.

This commit is contained in:
Leonardo Zide 2020-12-30 11:06:38 -08:00
parent 12089cca33
commit 801aab7cce

View file

@ -752,7 +752,18 @@ bool lcApplication::Initialize(QList<QPair<QString, bool>>& LibraryPaths, bool&
lcLoadDefaultKeyboardShortcuts();
lcLoadDefaultMouseShortcuts();
ShowWindow = !SaveImage && !SaveWavefront && !Save3DS && !SaveCOLLADA && !SaveHTML;
if (SaveImage || SaveWavefront || Save3DS || SaveCOLLADA || SaveHTML)
{
ShowWindow = false;
if (ProjectName.isEmpty())
{
printf("No file name specified.\n");
return false;
}
}
else
ShowWindow = true;
if (!LoadPartsLibrary(LibraryPaths, OnlyUseLibraryPaths, ShowWindow))
{