connect(uat_model_, SIGNAL(dataChanged(QModelIndex,QModelIndex)),
this, SLOT(modelDataChanged(QModelIndex)));
+ connect(uat_model_, SIGNAL(rowsRemoved(QModelIndex, int, int)),
+ this, SLOT(modelRowsRemoved()));
connect(ui->uatTreeView, SIGNAL(currentItemChanged(QModelIndex,QModelIndex)),
this, SLOT(viewCurrentChanged(QModelIndex,QModelIndex)));
ok_button_->setEnabled(!uat_model_->hasErrors());
ok_button_->setEnabled(!uat_model_->hasErrors());
}
+// Invoked after a row has been removed from the model.
+void UatDialog::modelRowsRemoved()
+{
+ const QModelIndex ¤t = ui->uatTreeView->currentIndex();
+ checkForErrorHint(current, QModelIndex());
+ ok_button_->setEnabled(!uat_model_->hasErrors());
+}
+
// Invoked when a different field is selected. Note: when selecting a different
// field after editing, this event is triggered after modelDataChanged.
void UatDialog::viewCurrentChanged(const QModelIndex ¤t, const QModelIndex &previous)