Fix read-only state for Skeleton and Inspector

This commit is contained in:
Silc Lizard (Tokage) Renew
2025-09-13 18:19:22 +09:00
parent ef34c3d534
commit c6ab601364
5 changed files with 98 additions and 10 deletions

View File

@ -4668,6 +4668,11 @@ void CanvasItemEditor::_insert_animation_keys(bool p_location, bool p_rotation,
AnimationTrackEditor *te = AnimationPlayerEditor::get_singleton()->get_track_editor();
ERR_FAIL_COND_MSG(te->get_current_animation().is_null(), "Cannot insert animation key. No animation selected.");
bool is_read_only = te->is_read_only();
if (is_read_only) {
te->popup_read_only_dialog();
return;
}
te->make_insert_queue();
for (const KeyValue<Node *, Object *> &E : selection) {
CanvasItem *ci = Object::cast_to<CanvasItem>(E.key);