summaryrefslogtreecommitdiff
path: root/core/src/UI/States.cpp
diff options
context:
space:
mode:
authorrtk0c <[email protected]>2021-03-30 19:40:11 -0700
committerrtk0c <[email protected]>2021-03-30 19:40:11 -0700
commit31950890c939862f79c817053c106bf711c63a64 (patch)
tree4e02abf37d69ab7d4f988f143b340cfd3d93331c /core/src/UI/States.cpp
parente75e26da92424528e190a2111acfcc49c657e894 (diff)
Product items and misc stuff
Diffstat (limited to 'core/src/UI/States.cpp')
-rw-r--r--core/src/UI/States.cpp9
1 files changed, 8 insertions, 1 deletions
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<UIState>();
}
+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> project) {
void UIState::CloseCurrentProject() {
if (CurrentProject) {
- // TODO save stuff
+ CurrentProject->WriteToDisk();
CurrentProject = nullptr;
}
}