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){
|
connect(table->horizontalHeader(),&QHeaderView::sectionClicked,[=](int index){
|
||||||
edit_patient->clearPatientInformation();
|
edit_patient->clearPatientInformation();
|
||||||
prepareButtons(false);
|
prepareButtons(false);
|
||||||
|
if(model->rowCount()>0){
|
||||||
|
table->selectRow(0);
|
||||||
|
model->selectRow(0);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// btn add slot
|
// btn add slot
|
||||||
@@ -155,9 +159,10 @@ SelectFormWidget::SelectFormWidget(QWidget* parent) :
|
|||||||
if (dialog.exec() == QDialog::Accepted) {
|
if (dialog.exec() == QDialog::Accepted) {
|
||||||
table->selectRow(0);
|
table->selectRow(0);
|
||||||
model->selectRow(0);
|
model->selectRow(0);
|
||||||
|
LOG_USER_OPERATION(AddPatient)
|
||||||
|
btnSelect->setEnabled(true);
|
||||||
}
|
}
|
||||||
LOG_USER_OPERATION(AddPatient)
|
|
||||||
btnSelect->setEnabled(true);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// btn edit slot
|
// btn edit slot
|
||||||
|
|||||||
Reference in New Issue
Block a user