Skip to content

Commit 948520b

Browse files
committed
fix: correct replacement of amp character in the wallet name for QMenu
The comment is missleading. If wallet name has & it is not supposed to use as a hot-key, but should be shown as it is without replacing to underscore
1 parent c4d45b6 commit 948520b

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/qt/bitcoingui.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -399,10 +399,7 @@ void BitcoinGUI::createActions()
399399
for (const std::pair<const std::string, bool>& i : m_wallet_controller->listWalletDir()) {
400400
const std::string& path = i.first;
401401
QString name = path.empty() ? QString("["+tr("default wallet")+"]") : QString::fromStdString(path);
402-
// Menu items remove single &. Single & are shown when && is in
403-
// the string, but only the first occurrence. So replace only
404-
// the first & with &&.
405-
name.replace(name.indexOf(QChar('&')), 1, QString("&&"));
402+
name.replace(QChar('&'), QString("&&"));
406403
QAction* action = m_open_wallet_menu->addAction(name);
407404

408405
if (i.second) {

0 commit comments

Comments
 (0)