Fix crash.

Valentina crashes if input not unique name and then switch and begin edit
a formula field.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2017-09-06 20:27:51 +03:00
parent e288c3a7ee
commit 4ab42b2cef

View File

@ -988,7 +988,15 @@ void DialogIncrements::SaveIncrName(const QString &text)
CacheRename(nameField->text(), newName);
hasChanges = true;
updateFlag ? LocalUpdateTree() : nameField->setText(newName);
if (updateFlag)
{
LocalUpdateTree();
}
else
{
nameField->setText(newName);
doc->LiteParseIncrements();
}
table->blockSignals(true);
table->selectRow(row);