diff --git a/common/lc_application.cpp b/common/lc_application.cpp index 5992cc90..25bd07c5 100644 --- a/common/lc_application.cpp +++ b/common/lc_application.cpp @@ -337,11 +337,9 @@ bool lcApplication::Initialize(int argc, char* argv[], QListCreateWidgets(); - // Create a new project. Project* NewProject = new Project(); SetProject(NewProject); - // Load project. if (ProjectName && gMainWindow->OpenProject(ProjectName)) { if (ModelName) @@ -384,17 +382,9 @@ bool lcApplication::Initialize(int argc, char* argv[], QListGetActiveModel()->GetCurrentStep(); - } else if ((ImageStart == 0) && (ImageEnd != 0)) - { ImageStart = ImageEnd; - } else if ((ImageStart != 0) && (ImageEnd == 0)) - { ImageEnd = ImageStart; - } if (ImageStart > 255) ImageStart = 255; diff --git a/common/lc_model.cpp b/common/lc_model.cpp index 8b3fd981..f069d42a 100644 --- a/common/lc_model.cpp +++ b/common/lc_model.cpp @@ -1344,6 +1344,9 @@ void lcModel::SaveStepImages(const QString& BaseName, bool AddStepSuffix, bool Z QImageWriter Writer(FileName); + if (Writer.format().isEmpty()) + Writer.setFormat("png"); + if (!Writer.write(View.GetRenderImage())) { QMessageBox::information(gMainWindow, tr("Error"), tr("Error writing to file '%1':\n%2").arg(FileName, Writer.errorString()));