mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-06 06:58:15 +00:00
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.
This commit is contained in:
parent
4eab4cc6b6
commit
81bcc07457
@ -1295,6 +1295,10 @@ void Widget::setMnemonic(int mnemonic)
|
|||||||
|
|
||||||
void Widget::processMnemonicFromText(int escapeChar)
|
void Widget::processMnemonicFromText(int escapeChar)
|
||||||
{
|
{
|
||||||
|
// Avoid calling setText() when the widget doesn't have the HAS_TEXT flag
|
||||||
|
if (!hasText())
|
||||||
|
return;
|
||||||
|
|
||||||
std::string newText;
|
std::string newText;
|
||||||
if (!m_text.empty())
|
if (!m_text.empty())
|
||||||
newText.reserve(m_text.size());
|
newText.reserve(m_text.size());
|
||||||
|
Loading…
Reference in New Issue
Block a user