Refactoring.
This commit is contained in:
parent
f5a5fadc52
commit
7779e16be3
|
@ -182,15 +182,13 @@ void DialogSaveLayout::SelectFormat(LayoutExportFormats format)
|
||||||
{
|
{
|
||||||
if (static_cast<int>(format) < 0 || format >= LayoutExportFormats::COUNT)
|
if (static_cast<int>(format) < 0 || format >= LayoutExportFormats::COUNT)
|
||||||
{
|
{
|
||||||
VException e(tr("Tried to use out of range format number."));
|
throw VException(tr("Tried to use out of range format number."));
|
||||||
throw e;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const int i = ui->comboBoxFormat->findData(static_cast<int>(format));
|
const int i = ui->comboBoxFormat->findData(static_cast<int>(format));
|
||||||
if (i < 0)
|
if (i < 0)
|
||||||
{
|
{
|
||||||
VException e(tr("Selected not present format."));
|
throw VException(tr("Selected not present format."));
|
||||||
throw e;
|
|
||||||
}
|
}
|
||||||
ui->comboBoxFormat->setCurrentIndex(i);
|
ui->comboBoxFormat->setCurrentIndex(i);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user