Ensure BankSetupWizard triggers only when bankProfileId is empty and pinCodeChecked is false in DeviceSettingsWindow and DeviceWidget.
This commit is contained in:
parent
93da7f52a5
commit
00a6833211
@ -147,7 +147,7 @@ void DeviceSettingsWindow::reloadContent(QTableWidget *tableWidget) {
|
||||
|
||||
connect(settingsBtn, &QPushButton::clicked, this, [this, app, tableWidget]() {
|
||||
const BankProfileInfo dbApp = BankProfileDAO::getApplication(m_deviceId, app.code);
|
||||
if (dbApp.id < 0 || !dbApp.pinCodeChecked) {
|
||||
if (dbApp.id < 0 || (!dbApp.pinCodeChecked && dbApp.bankProfileId.isEmpty())) {
|
||||
auto *wizard = new BankSetupWizard(this, m_deviceId, dbApp.id >= 0 ? dbApp : app);
|
||||
wizard->setAttribute(Qt::WA_DeleteOnClose);
|
||||
connect(wizard, &QDialog::finished, this, [this, tableWidget]() {
|
||||
|
||||
@ -239,7 +239,7 @@ void DeviceWidget::setOpenBanksSettings(QPushButton *button, const BankProfileIn
|
||||
QString deviceName = m_device.name;
|
||||
connect(button, &QPushButton::clicked, this, [deviceId, deviceName, app]() {
|
||||
const BankProfileInfo dbApp = BankProfileDAO::getApplication(deviceId, app.code);
|
||||
if (dbApp.id < 0 || !dbApp.pinCodeChecked) {
|
||||
if (dbApp.id < 0 || (!dbApp.pinCodeChecked && dbApp.bankProfileId.isEmpty())) {
|
||||
auto *wizard = new BankSetupWizard(nullptr, deviceId, dbApp.id >= 0 ? dbApp : app);
|
||||
wizard->setAttribute(Qt::WA_DeleteOnClose);
|
||||
wizard->show();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user