Set the main model active if no models are set on the command line when saving images. Fixes #243.

This commit is contained in:
Leonardo Zide 2018-07-07 15:26:36 -07:00
parent 1451ae8a6c
commit c25a389f19

View file

@ -438,7 +438,12 @@ bool lcApplication::Initialize(QList<QPair<QString, bool>>& LibraryPaths, bool&
if (SaveImage)
{
lcModel* ActiveModel = mProject->GetActiveModel();
lcModel* ActiveModel;
if (ModelName.isEmpty())
ActiveModel = mProject->GetMainModel();
else
ActiveModel = mProject->GetActiveModel();
if (ImageName.isEmpty())
ImageName = mProject->GetImageFileName(true);