diff options
author | Andrew Chow <achow101-github@achow101.com> | 2019-09-08 00:24:47 -0400 |
---|---|---|
committer | Andrew Chow <achow101-github@achow101.com> | 2019-09-08 16:40:53 -0400 |
commit | ad52f054f67374dc46e0096d1e2f593d6372a2df (patch) | |
tree | b13e7e5a136b828d3e050bd7518ef91bfba08ba0 /src | |
parent | 2c530ea2ada71ca23fa17bab5023b855515463ef (diff) |
Escape ampersands (&) in wallet names in Open Wallet menu
Diffstat (limited to 'src')
-rw-r--r-- | src/qt/bitcoingui.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index c4960b38d7..a1e42bb56f 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -375,6 +375,8 @@ void BitcoinGUI::createActions() for (const std::pair<const std::string, bool>& i : m_wallet_controller->listWalletDir()) { const std::string& path = i.first; QString name = path.empty() ? QString("["+tr("default wallet")+"]") : QString::fromStdString(path); + // Menu items remove single &. Single & are shown when && is in the string, but only the first occurrence. So replace only the first & with && + name.replace(name.indexOf(QChar('&')), 1, QString("&&")); QAction* action = m_open_wallet_menu->addAction(name); if (i.second) { |