Fix a bug : try to find parent on a NULL operation in TabDelegate
This commit is contained in:
parent
beaace517f
commit
4addfc99d5
|
@ -38,7 +38,8 @@ void TabDelegate::setModelData(QWidget *editor, QAbstractItemModel *model,
|
|||
QLineEdit *line = qobject_cast<QLineEdit *>(editor);
|
||||
QString value = line->text().trimmed();
|
||||
|
||||
if ((*_operations)[index.row()].parent)
|
||||
if (index.row() < _operations->size() && (*_operations)[index.row()].id &&
|
||||
(*_operations)[index.row()].parent)
|
||||
model->setData(index, qVariantFromValue(" " + value));
|
||||
else
|
||||
model->setData(index, qVariantFromValue(value));
|
||||
|
|
Loading…
Reference in New Issue
Block a user