aboutsummaryrefslogtreecommitdiff
path: root/core/src/UI/UI_Items.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/UI/UI_Items.cpp')
-rw-r--r--core/src/UI/UI_Items.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/core/src/UI/UI_Items.cpp b/core/src/UI/UI_Items.cpp
index 7ed8f80..d006166 100644
--- a/core/src/UI/UI_Items.cpp
+++ b/core/src/UI/UI_Items.cpp
@@ -3,7 +3,6 @@
#include "Model/GlobalStates.hpp"
#include "Model/Project.hpp"
#include "UI/Localization.hpp"
-#include "UI/States.hpp"
#include <imgui.h>
#include <imgui_stdlib.h>
@@ -32,7 +31,7 @@ ActionResult ItemEditor(ItemList<T>& list, T* item)
};
auto ls = LocaleStrings::Instance.get();
- auto& uis = UIState::GetInstance();
+ auto& gs = GlobalStates::GetInstance();
static bool duplicateName = false;
@@ -117,7 +116,7 @@ void ItemListEntries(ItemList<T>& list, int& selectedIdx)
constexpr int kColumns = 1 /* Name column */ + kHasDescription + kHasEmail + kHasStock + kHasPrice;
auto ls = LocaleStrings::Instance.get();
- auto& uis = UIState::GetInstance();
+ auto& gs = GlobalStates::GetInstance();
if (ImGui::BeginTable("", kColumns, ImGuiTableFlags_Borders)) {
@@ -241,19 +240,19 @@ void ItemListEditor(ItemList<T>& list)
void UI::ItemsTab()
{
auto ls = LocaleStrings::Instance.get();
- auto& uis = UIState::GetInstance();
+ auto& gs = GlobalStates::GetInstance();
if (ImGui::BeginTabBar("ItemViewTabs")) {
if (ImGui::BeginTabItem(ls->ProductCategoryName.Get())) {
- ItemListEditor(uis.CurrentProject->Products);
+ ItemListEditor(gs.GetCurrentProject()->Products);
ImGui::EndTabItem();
}
if (ImGui::BeginTabItem(ls->FactoryCategoryName.Get())) {
- ItemListEditor(uis.CurrentProject->Factories);
+ ItemListEditor(gs.GetCurrentProject()->Factories);
ImGui::EndTabItem();
}
if (ImGui::BeginTabItem(ls->CustomerCategoryName.Get())) {
- ItemListEditor(uis.CurrentProject->Customers);
+ ItemListEditor(gs.GetCurrentProject()->Customers);
ImGui::EndTabItem();
}
ImGui::EndTabBar();