浏览代码

RichTextLabel: clear the scroll offset.

allkhor 6 年之前
父节点
当前提交
970dc91cb7
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      scene/gui/rich_text_label.cpp

+ 1 - 0
scene/gui/rich_text_label.cpp

@@ -1616,6 +1616,7 @@ void RichTextLabel::clear() {
 	main->lines.clear();
 	main->lines.clear();
 	main->lines.resize(1);
 	main->lines.resize(1);
 	main->first_invalid_line = 0;
 	main->first_invalid_line = 0;
+	scroll_w = 0;
 	update();
 	update();
 	selection.click = NULL;
 	selection.click = NULL;
 	selection.active = false;
 	selection.active = false;