mirror of
https://github.com/aseprite/aseprite.git
synced 2025-04-17 08:43:11 +00:00
Fix ColorShades() painting of default text
Regression introduced in 9a75d01efeaef8db9c61e01dbc9b5aae47c8f515
This commit is contained in:
parent
9c81ed46f2
commit
8e1f98a45f
@ -433,7 +433,10 @@ gfx::Size Graphics::doUIStringAlgorithm(const std::string& str, gfx::Color fg, g
|
||||
// Without word-wrap
|
||||
if ((align & (WORDWRAP | CHARWRAP)) == 0) {
|
||||
end = str.find('\n', beg);
|
||||
newBeg = end+1;
|
||||
if (end != std::string::npos)
|
||||
newBeg = end+1;
|
||||
else
|
||||
newBeg = std::string::npos;
|
||||
}
|
||||
// With char-wrap
|
||||
else if ((align & CHARWRAP) == CHARWRAP) {
|
||||
@ -485,7 +488,7 @@ gfx::Size Graphics::doUIStringAlgorithm(const std::string& str, gfx::Color fg, g
|
||||
if (end != std::string::npos)
|
||||
line = str.substr(beg, end-beg);
|
||||
else
|
||||
line.clear();
|
||||
line = str.substr(beg);
|
||||
|
||||
gfx::Size lineSize(
|
||||
m_font->textLength(line.c_str()),
|
||||
|
Loading…
x
Reference in New Issue
Block a user