From 81bcc07457971ea2499e678d42e4e4d95a312ab8 Mon Sep 17 00:00:00 2001 From: David Capello Date: Thu, 9 Mar 2017 12:00:32 -0300 Subject: [PATCH] Fix canvas size button set item borders We must not activate HAS_TEXT flag on widgets without text on XML files processing the mnemonic character. --- src/ui/widget.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ui/widget.cpp b/src/ui/widget.cpp index b570dc753..d24ddc94d 100644 --- a/src/ui/widget.cpp +++ b/src/ui/widget.cpp @@ -1295,6 +1295,10 @@ void Widget::setMnemonic(int mnemonic) void Widget::processMnemonicFromText(int escapeChar) { + // Avoid calling setText() when the widget doesn't have the HAS_TEXT flag + if (!hasText()) + return; + std::string newText; if (!m_text.empty()) newText.reserve(m_text.size());