mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-06 19:23:41 +02:00
Fix RPCConsole wallet selection
If a user opens multiple wallets in the GUI from the menu bar, the last one opened is the active one in the main window. However, For the RPC Console window, the _first_ one opened is active. This can be confusing, as wallet RPC commands may be sent to a wallet the user didn't intend. This commit makes the RPC Console switch to the wallet opened from the menu bar.
This commit is contained in:
@@ -798,6 +798,12 @@ void RPCConsole::removeWallet(WalletModel * const walletModel)
|
||||
ui->WalletSelectorLabel->setVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
void RPCConsole::setCurrentWallet(WalletModel* const wallet_model)
|
||||
{
|
||||
QVariant data = QVariant::fromValue(wallet_model);
|
||||
ui->WalletSelector->setCurrentIndex(ui->WalletSelector->findData(data));
|
||||
}
|
||||
#endif
|
||||
|
||||
static QString categoryClass(int category)
|
||||
|
||||
Reference in New Issue
Block a user