#3982 CC: Fix visual duplication of presets on renaming

1f7c65b45a1f804e1bb891dde90c1aeeff7d3722

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +3 -2Showing whitespace changes
public/scripts/preset-manager.js+3 -2
@@ -696,13 +696,14 @@ class PresetManager {
696696 return;
697697 }
698698
699- $(this.select).find(`option[value="${value}"]`).remove();
700-
701699 if (this.isKeyedApi()) {
700+ $(this.select).find(`option[value="${value}"]`).remove();
702701 const index = preset_names.indexOf(nameToDelete);
703702 preset_names.splice(index, 1);
704703 presets.splice(index, 1);
705704 } else {
705+ const index = preset_names[nameToDelete];
706+ $(this.select).find(`option[value="${index}"]`).remove();
706707 delete preset_names[nameToDelete];
707708 }
708709