Refactoring.

This commit is contained in:
Roman Telezhynskyi 2021-06-28 10:23:44 +03:00
parent f5a5fadc52
commit 7779e16be3

View File

@ -182,15 +182,13 @@ void DialogSaveLayout::SelectFormat(LayoutExportFormats format)
{
if (static_cast<int>(format) < 0 || format >= LayoutExportFormats::COUNT)
{
VException e(tr("Tried to use out of range format number."));
throw e;
throw VException(tr("Tried to use out of range format number."));
}
const int i = ui->comboBoxFormat->findData(static_cast<int>(format));
if (i < 0)
{
VException e(tr("Selected not present format."));
throw e;
throw VException(tr("Selected not present format."));
}
ui->comboBoxFormat->setCurrentIndex(i);
}