浏览代码

Merge pull request #28729 from freestraws/animated_sprite_fps

Apply sprite frames editor FPS value correctly upon _animation_select
Rémi Verschelde 6 年之前
父节点
当前提交
136f90ed77
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      editor/plugins/sprite_frames_editor_plugin.cpp

+ 4 - 0
editor/plugins/sprite_frames_editor_plugin.cpp

@@ -456,6 +456,10 @@ void SpriteFramesEditor::_animation_select() {
 	if (updating)
 		return;
 
+	double value = anim_speed->get_line_edit()->get_text().to_double();
+	if (!Math::is_equal_approx(value, frames->get_animation_speed(edited_anim)))
+		_animation_fps_changed(value);
+
 	TreeItem *selected = animations->get_selected();
 	ERR_FAIL_COND(!selected);
 	edited_anim = selected->get_text(0);