BugFix: show message box if no wallet is selected

This commit is contained in:
mrdeveloper 2020-10-23 19:57:06 +02:00
parent 3d5dae1f42
commit 71ba9f6d4a

View file

@ -66,6 +66,10 @@ int OpenWalletPage::nextId() const {
bool OpenWalletPage::validatePage() {
QModelIndex index = ui->walletTable->currentIndex();
if(!index.isValid()) {
Utils::showMessageBox("Wallet not selected", "Please select a wallet from the list.", true);
return false;
}
QString walletPath = index.model()->data(index.siblingAtColumn(WalletKeysFilesModel::ModelColumns::Path), Qt::UserRole).toString();
auto autoWallet = ui->openOnStartup->isChecked() ? QString("%1%2").arg(m_ctx->networkType).arg(walletPath) : "";