mirror of
https://github.com/leozide/leocad
synced 2025-01-18 22:26:44 +01:00
Set the main model active if no models are set on the command line when saving images. Fixes #243.
This commit is contained in:
parent
1451ae8a6c
commit
c25a389f19
1 changed files with 6 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue