Fix column header click bug(about current row)
This commit is contained in:
@@ -143,6 +143,10 @@ SelectFormWidget::SelectFormWidget(QWidget* parent) :
|
||||
connect(table->horizontalHeader(),&QHeaderView::sectionClicked,[=](int index){
|
||||
edit_patient->clearPatientInformation();
|
||||
prepareButtons(false);
|
||||
if(model->rowCount()>0){
|
||||
table->selectRow(0);
|
||||
model->selectRow(0);
|
||||
}
|
||||
});
|
||||
|
||||
// btn add slot
|
||||
@@ -155,9 +159,10 @@ SelectFormWidget::SelectFormWidget(QWidget* parent) :
|
||||
if (dialog.exec() == QDialog::Accepted) {
|
||||
table->selectRow(0);
|
||||
model->selectRow(0);
|
||||
}
|
||||
LOG_USER_OPERATION(AddPatient)
|
||||
btnSelect->setEnabled(true);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// btn edit slot
|
||||
|
||||
Reference in New Issue
Block a user