mirror of
https://github.com/godotengine/godot.git
synced 2024-11-23 12:43:43 +00:00
Merge pull request #72447 from TokageItLab/fix-sprite-frames-edit-switching
Fix SpriteFramesEditor is spamming to switch bottom panel
This commit is contained in:
commit
5f90989c26
@ -1523,8 +1523,25 @@ SpriteFramesEditor::SpriteFramesEditor() {
|
||||
delete_anim->set_disabled(true);
|
||||
delete_anim->connect("pressed", callable_mp(this, &SpriteFramesEditor::_animation_remove));
|
||||
|
||||
autoplay_container = memnew(HBoxContainer);
|
||||
hbc_animlist->add_child(autoplay_container);
|
||||
|
||||
autoplay_container->add_child(memnew(VSeparator));
|
||||
|
||||
autoplay = memnew(Button);
|
||||
autoplay->set_flat(true);
|
||||
autoplay->set_tooltip_text(TTR("Autoplay on Load"));
|
||||
autoplay_container->add_child(autoplay);
|
||||
|
||||
hbc_animlist->add_child(memnew(VSeparator));
|
||||
|
||||
anim_loop = memnew(Button);
|
||||
anim_loop->set_toggle_mode(true);
|
||||
anim_loop->set_flat(true);
|
||||
anim_loop->set_tooltip_text(TTR("Animation Looping"));
|
||||
anim_loop->connect("pressed", callable_mp(this, &SpriteFramesEditor::_animation_loop_changed));
|
||||
hbc_animlist->add_child(anim_loop);
|
||||
|
||||
anim_speed = memnew(SpinBox);
|
||||
anim_speed->set_suffix(TTR("FPS"));
|
||||
anim_speed->set_min(0);
|
||||
@ -1535,23 +1552,6 @@ SpriteFramesEditor::SpriteFramesEditor() {
|
||||
anim_speed->connect("value_changed", callable_mp(this, &SpriteFramesEditor::_animation_speed_changed));
|
||||
hbc_animlist->add_child(anim_speed);
|
||||
|
||||
anim_loop = memnew(Button);
|
||||
anim_loop->set_toggle_mode(true);
|
||||
anim_loop->set_flat(true);
|
||||
anim_loop->set_tooltip_text(TTR("Animation Looping"));
|
||||
anim_loop->connect("pressed", callable_mp(this, &SpriteFramesEditor::_animation_loop_changed));
|
||||
hbc_animlist->add_child(anim_loop);
|
||||
|
||||
autoplay_container = memnew(HBoxContainer);
|
||||
hbc_animlist->add_child(autoplay_container);
|
||||
|
||||
autoplay_container->add_child(memnew(VSeparator));
|
||||
|
||||
autoplay = memnew(Button);
|
||||
autoplay->set_flat(true);
|
||||
autoplay->set_tooltip_text(TTR("Autoplay on Load"));
|
||||
autoplay_container->add_child(autoplay);
|
||||
|
||||
anim_search_box = memnew(LineEdit);
|
||||
sub_vb->add_child(anim_search_box);
|
||||
anim_search_box->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
@ -1953,9 +1953,7 @@ void SpriteFramesEditorPlugin::make_visible(bool p_visible) {
|
||||
EditorNode::get_singleton()->make_bottom_panel_item_visible(frames_editor);
|
||||
} else {
|
||||
button->hide();
|
||||
if (frames_editor->is_visible_in_tree()) {
|
||||
EditorNode::get_singleton()->hide_bottom_panel();
|
||||
}
|
||||
frames_editor->edit(Ref<SpriteFrames>());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user