|
@@ -3867,15 +3867,23 @@ void AnimationTrackEditor::commit_insert_queue() {
|
|
|
}
|
|
|
|
|
|
// Skip the confirmation dialog if the user holds Shift while clicking the key icon.
|
|
|
- if (!Input::get_singleton()->is_key_pressed(Key::SHIFT) && num_tracks > 0) {
|
|
|
- String shortcut_hint = TTR("Hold Shift when clicking the key icon to skip this dialog.");
|
|
|
+ // If `confirm_insert_track` editor setting is disabled, the behavior is reversed.
|
|
|
+ bool confirm_insert = EDITOR_GET("editors/animation/confirm_insert_track");
|
|
|
+ if ((Input::get_singleton()->is_key_pressed(Key::SHIFT) != confirm_insert) && num_tracks > 0) {
|
|
|
+ String dialog_text;
|
|
|
+
|
|
|
// Potentially a new key, does not exist.
|
|
|
if (num_tracks == 1) {
|
|
|
// TRANSLATORS: %s will be replaced by a phrase describing the target of track.
|
|
|
- insert_confirm_text->set_text(vformat(TTR("Create new track for %s and insert key?") + "\n\n" + shortcut_hint, last_track_query));
|
|
|
+ dialog_text = vformat(TTR("Create new track for %s and insert key?"), last_track_query);
|
|
|
} else {
|
|
|
- insert_confirm_text->set_text(vformat(TTR("Create %d new tracks and insert keys?") + "\n\n" + shortcut_hint, num_tracks));
|
|
|
+ dialog_text = vformat(TTR("Create %d new tracks and insert keys?"), num_tracks);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (confirm_insert) {
|
|
|
+ dialog_text += +"\n\n" + TTR("Hold Shift when clicking the key icon to skip this dialog.");
|
|
|
}
|
|
|
+ insert_confirm_text->set_text(dialog_text);
|
|
|
|
|
|
insert_confirm_bezier->set_visible(all_bezier);
|
|
|
insert_confirm_reset->set_visible(reset_allowed);
|