fix: Delete patient error while patient finish scan process.
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#include "components/VerticalTextToolButton.h"
|
||||
#include "PatientAddDateDelegate.h"
|
||||
#include "dicom/WorkListManager.h"
|
||||
#include "utilities/ScanProcessSequence.h"
|
||||
|
||||
SelectFormWidget::SelectFormWidget(QWidget* parent)
|
||||
: TabFormWidget(parent)
|
||||
@@ -84,6 +85,8 @@ SelectFormWidget::SelectFormWidget(QWidget* parent)
|
||||
this->setSelectedPatient(patientInfo);
|
||||
});
|
||||
|
||||
connect(ScanProcessSequence::getInstance(), &ScanProcessSequence::ScanProcessSequenceFinished, this, &SelectFormWidget::clearSelectedPatient);
|
||||
|
||||
//first prepare buttons!
|
||||
prepareButtons(false);
|
||||
|
||||
@@ -154,7 +157,7 @@ void SelectFormWidget::delPatient() {
|
||||
if (mPatTable->currentIndex().row() < 0) return;
|
||||
QString pUid = mModel->index(mPatTable->currentIndex().row(), PatientUID).data().toString();
|
||||
// patient has been selected as the scan patient!
|
||||
if (selectedPatientUID == pUid){
|
||||
if (mSelectedPatientUID == pUid){
|
||||
DialogManager::Default()->requestAlertMessage(tr("Can't delete selected Patient !"),DialogButtonMode::OkOnly,tr("Alert"));
|
||||
return;
|
||||
}
|
||||
@@ -187,7 +190,12 @@ void SelectFormWidget::selectPatient() {
|
||||
|
||||
void SelectFormWidget::setSelectedPatient(PatientInformation* aPatient)
|
||||
{
|
||||
selectedPatientUID = aPatient->PatientUID;
|
||||
mSelectedPatientUID = aPatient->PatientUID;
|
||||
}
|
||||
|
||||
void SelectFormWidget::clearSelectedPatient()
|
||||
{
|
||||
mSelectedPatientUID.clear();
|
||||
}
|
||||
|
||||
void SelectFormWidget::initDetailPanel(QHBoxLayout *contentLayout) {// prepare edit panel
|
||||
|
||||
Reference in New Issue
Block a user