From 976a5eb5ec4545d39d2837ac1ca8a893afc3838a Mon Sep 17 00:00:00 2001 From: Steve Daulton Date: Wed, 3 Aug 2016 00:27:07 +0100 Subject: [PATCH] Fix bug 1466 Display just the button name in tooltip when no shortcut. --- src/toolbars/ToolBar.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/toolbars/ToolBar.cpp b/src/toolbars/ToolBar.cpp index 03e79d24c..32940cf26 100644 --- a/src/toolbars/ToolBar.cpp +++ b/src/toolbars/ToolBar.cpp @@ -799,10 +799,10 @@ void ToolBar::SetButtonToolTip if (!iter->empty()) { if (commandManager) { auto keyStr = commandManager->GetKeyFromName(*iter); - if (keyStr.empty()) - keyStr = _("no key"); - result += wxT(" "); - result += Internat::Parenthesize(KeyStringDisplay(keyStr, true)); + if (!keyStr.empty()) { + result += wxT(" "); + result += Internat::Parenthesize(KeyStringDisplay(keyStr, true)); + } } } ++iter;