Skip to content

Commit

Permalink
Updated Pipe
Browse files Browse the repository at this point in the history
  • Loading branch information
muit committed Feb 22, 2023
1 parent 7aaadd9 commit 0d703c7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
17 changes: 9 additions & 8 deletions Libs/Editor/Src/Systems/EditorSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -394,10 +394,10 @@ namespace rift::Editor::EditorSystem
if (UI::MenuItem(ICON_FA_SAVE, "CTRL+S"))
{
auto& file = ast.Get<AST::CFileRef>(moduleId);
TPair<Path, String> fileData{file.path, ""};
AST::SerializeModule(ast, moduleId, fileData.second);
String data;
AST::SerializeModule(ast, moduleId, data);

files::SaveStringFile(fileData.first, fileData.second);
files::SaveStringFile(file.path, data);
ast.Remove<AST::CFileDirty>(moduleId);

UI::AddNotification({UI::ToastType::Success, 1.f,
Expand Down Expand Up @@ -501,15 +501,16 @@ namespace rift::Editor::EditorSystem
if (UI::MenuItem(ICON_FA_SAVE, "CTRL+S"))
{
auto& file = ast.Get<AST::CFileRef>(typeId);
TPair<Path, String> fileData{file.path, ""};
AST::SerializeType(ast, typeId, fileData.second);
String data;
AST::SerializeType(ast, typeId, data);

files::SaveStringFile(file.path, data);
ast.Remove<AST::CFileDirty>(typeId);

UI::AddNotification({UI::ToastType::Success, 1.f,
Strings::Format("Saved file {}", p::GetFilename(file.path))});

files::SaveStringFile(fileData.first, fileData.second);
ast.Remove<AST::CFileDirty>(typeId);
}

if (UI::BeginMenu("View"))
{
if (AST::HasFunctions(ast, typeId))
Expand Down
2 changes: 1 addition & 1 deletion Libs/Pipe
Submodule Pipe updated 1 files
+1 −1 Include/Pipe/ECS/Pool.h

0 comments on commit 0d703c7

Please sign in to comment.