Check if setted detail is valid.

--HG--
branch : feature
This commit is contained in:
Roman Telezhynskyi 2015-12-26 15:18:58 +02:00
parent 00b8aae5a7
commit a11b3c3203

View File

@ -292,6 +292,7 @@ void DialogDetail::setDetail(const VDetail &value)
ui.listWidget->setCurrentRow(0); ui.listWidget->setCurrentRow(0);
ui.listWidget->setFocus(Qt::OtherFocusReason); ui.listWidget->setFocus(Qt::OtherFocusReason);
ui.toolButtonDelete->setEnabled(true); ui.toolButtonDelete->setEnabled(true);
ValidObjects(DetailIsValid());
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -490,7 +491,7 @@ bool DialogDetail::DetailIsValid() const
} }
if (FirstPointEqualLast()) if (FirstPointEqualLast())
{ {
url += tr("First point can not equal the last point!"); url += tr("First point cannot be equal to the last point!");
ui.helpLabel->setText(url); ui.helpLabel->setText(url);
return false; return false;
} }