Fix compatibility with previous versions.

This commit is contained in:
Roman Telezhynskyi 2024-02-27 15:10:26 +02:00
parent 283a62f580
commit 97d4e6378a
2 changed files with 24 additions and 3 deletions

View File

@ -607,7 +607,14 @@ void DialogSaveManualLayout::RemoveFormatFromList(LayoutExportFormats format)
void DialogSaveManualLayout::ReadSettings()
{
VPSettings *settings = VPApplication::VApp()->PuzzleSettings();
SelectFormat(static_cast<LayoutExportFormats>(settings->GetLayoutExportFormat()));
try
{
SelectFormat(static_cast<LayoutExportFormats>(settings->GetLayoutExportFormat()));
}
catch (VException &e)
{
qDebug() << qUtf8Printable(e.ErrorMessage());
}
SetShowGrainline(settings->GetShowGrainline());
}

View File

@ -786,11 +786,25 @@ void DialogSaveLayout::ReadSettings()
if (m_mode != Draw::Layout)
{
SelectFormat(static_cast<LayoutExportFormats>(settings->GetDetailExportFormat()));
try
{
SelectFormat(static_cast<LayoutExportFormats>(settings->GetDetailExportFormat()));
}
catch (VException &e)
{
qDebug() << qUtf8Printable(e.ErrorMessage());
}
}
else
{
SelectFormat(static_cast<LayoutExportFormats>(settings->GetLayoutExportFormat()));
try
{
SelectFormat(static_cast<LayoutExportFormats>(settings->GetLayoutExportFormat()));
}
catch (VException &e)
{
qDebug() << qUtf8Printable(e.ErrorMessage());
}
SetShowGrainline(settings->GetShowGrainline());
}
}