From 31950890c939862f79c817053c106bf711c63a64 Mon Sep 17 00:00:00 2001 From: rtk0c Date: Tue, 30 Mar 2021 19:40:11 -0700 Subject: Product items and misc stuff --- core/src/UI/States.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'core/src/UI/States.cpp') diff --git a/core/src/UI/States.cpp b/core/src/UI/States.cpp index 07bbcf7..dc7c37a 100644 --- a/core/src/UI/States.cpp +++ b/core/src/UI/States.cpp @@ -11,6 +11,13 @@ void UIState::Init() { uiStateInstance = std::make_unique(); } +void UIState::Shutdown() { + if (uiStateInstance) { + uiStateInstance->CloseCurrentProject(); + uiStateInstance = nullptr; + } +} + UIState& UIState::GetInstance() { return *uiStateInstance; } @@ -22,7 +29,7 @@ void UIState::SetCurrentProject(std::unique_ptr project) { void UIState::CloseCurrentProject() { if (CurrentProject) { - // TODO save stuff + CurrentProject->WriteToDisk(); CurrentProject = nullptr; } } -- cgit v1.2.3-70-g09d2