| 225 | } |
| 226 | |
| 227 | void SubsController::Close() { |
| 228 | undo_stack.clear(); |
| 229 | redo_stack.clear(); |
| 230 | autosaved_commit_id = saved_commit_id = commit_id + 1; |
| 231 | filename.clear(); |
| 232 | AssFile blank; |
| 233 | blank.swap(*context->ass); |
| 234 | context->ass->LoadDefault(true, OPT_GET("Subtitle Format/ASS/Default Style Catalog")->GetString()); |
| 235 | context->ass->Commit("", AssFile::COMMIT_NEW); |
| 236 | FileOpen(filename); |
| 237 | } |
| 238 | |
| 239 | int SubsController::TryToClose(bool allow_cancel) const { |
| 240 | if (!IsModified()) |
no test coverage detected