浏览代码

Merge pull request #95947 from passivestar/timelineedit-namelimit

Fix animation timeline resize widget allowing invalid internal values
Rémi Verschelde 1 年之前
父节点
当前提交
473e7e0df3
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      editor/animation_track_editor.cpp

+ 2 - 0
editor/animation_track_editor.cpp

@@ -1855,6 +1855,8 @@ void AnimationTimelineEdit::gui_input(const Ref<InputEvent> &p_event) {
 		if (dragging_hsize) {
 			int ofs = mm->get_position().x - dragging_hsize_from;
 			name_limit = dragging_hsize_at + ofs;
+			// Make sure name_limit is clamped to the range that UI allows.
+			name_limit = get_name_limit();
 			queue_redraw();
 			emit_signal(SNAME("name_limit_changed"));
 			play_position->queue_redraw();