| 421 | } |
| 422 | |
| 423 | void EditorExportPreset::add_patch(const String &p_path, int p_at_pos) { |
| 424 | ERR_FAIL_COND_EDMSG(patches.has(p_path), vformat("Failed to add patch \"%s\". Patches must be unique.", p_path)); |
| 425 | |
| 426 | if (p_at_pos < 0) { |
| 427 | patches.push_back(p_path); |
| 428 | } else { |
| 429 | patches.insert(p_at_pos, p_path); |
| 430 | } |
| 431 | |
| 432 | EditorExport::singleton->save_presets(); |
| 433 | } |
| 434 | |
| 435 | void EditorExportPreset::set_patch(int p_index, const String &p_path) { |
| 436 | remove_patch(p_index); |
no test coverage detected