diff options
author | rtk0c <[email protected]> | 2021-08-15 09:17:02 -0700 |
---|---|---|
committer | rtk0c <[email protected]> | 2021-08-15 09:17:02 -0700 |
commit | 64a6dbcfdb89a5f57d93d47a2be0c741dda4662d (patch) | |
tree | 241eaba2351f3a7e6343ce93532e19a4b93757d3 /core/src/UI/UI_Workflows.cpp | |
parent | f0326e5c5deca0fb719d8522b45c59364b566300 (diff) |
Fix issues and cleanup
- Fix compile error on MSVC where <vector> is not included properly
- Fix creating a workflow actually saves to the templates/ directory
- Fix renaming assets are not saved to disk
- TODO ser/deser still not working
- Cleanup AssetList::* pure virtual setup (fewer splits)
Diffstat (limited to 'core/src/UI/UI_Workflows.cpp')
-rw-r--r-- | core/src/UI/UI_Workflows.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/core/src/UI/UI_Workflows.cpp b/core/src/UI/UI_Workflows.cpp index e61e934..036e532 100644 --- a/core/src/UI/UI_Workflows.cpp +++ b/core/src/UI/UI_Workflows.cpp @@ -44,7 +44,7 @@ public: ImNodes::DestroyEditor(mContext); } - void Draw() + void Display() { ImNodes::SetCurrentEditor(mContext); ImNodes::Begin(""); @@ -235,6 +235,11 @@ public: ImNodes::End(); } + + void Close() + { + // TODO + } }; } // namespace @@ -248,6 +253,7 @@ void UI::WorkflowsTab() // Toolbar item: close if (ImGui::Button(ICON_FA_TIMES " " I18N_TEXT("Close", L10N_CLOSE), openWorkflow == nullptr)) { + openWorkflow->Close(); openWorkflow = nullptr; } @@ -257,7 +263,9 @@ void UI::WorkflowsTab() ImGui::OpenPopup(I18N_TEXT("Open asset", L10N_ASSET_OPEN_DIALOG_TITLE)); } if (ImGui::BeginPopupModal(I18N_TEXT("Open asset", L10N_ASSET_OPEN_DIALOG_TITLE), &openedDummy, ImGuiWindowFlags_AlwaysAutoResize)) { - if (ImGui::Button(I18N_TEXT("Open", L10N_OPEN), state.SelectedAsset == nullptr)) { + if (ImGui::Button(ICON_FA_FOLDER_OPEN " " I18N_TEXT("Open", L10N_OPEN), state.SelectedAsset == nullptr)) { + ImGui::CloseCurrentPopup(); + auto workflow = project.Workflows.Load(*state.SelectedAsset); openWorkflow = std::make_unique<WorkflowUI>(std::move(workflow)); } @@ -280,6 +288,6 @@ void UI::WorkflowsTab() } if (openWorkflow) { - openWorkflow->Draw(); + openWorkflow->Display(); } } |