From 801aab7cce91368f7c56acda076bc476415e3370 Mon Sep 17 00:00:00 2001 From: Leonardo Zide Date: Wed, 30 Dec 2020 11:06:38 -0800 Subject: [PATCH] Show error message if save option used without a file name. --- common/lc_application.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/common/lc_application.cpp b/common/lc_application.cpp index 7e8b1b94..3504ac4b 100644 --- a/common/lc_application.cpp +++ b/common/lc_application.cpp @@ -752,7 +752,18 @@ bool lcApplication::Initialize(QList>& 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)) {