fixed a autowrap bug when word is too length.
This commit is contained in:
parent
57d571a1c4
commit
c322eddffb
|
@ -136,10 +136,9 @@ void Label::_notification(int p_what) {
|
|||
if (!wc)
|
||||
return;
|
||||
|
||||
|
||||
int c = 0;
|
||||
int line=0;
|
||||
while(wc) {
|
||||
|
||||
/* handle lines not meant to be drawn quickly */
|
||||
if (line>line_to)
|
||||
break;
|
||||
|
@ -486,7 +485,7 @@ void Label::regenerate_word_cache() {
|
|||
|
||||
}
|
||||
|
||||
if ((autowrap && line_width>=width && last_width<width) || insert_newline) {
|
||||
if ((autowrap && line_width>=width && last && last->char_pos >= 0) || insert_newline) {
|
||||
|
||||
WordCache *wc = memnew( WordCache );
|
||||
if (word_cache) {
|
||||
|
|
Loading…
Reference in New Issue