mirror of
https://github.com/arabine/open-story-teller.git
synced 2025-12-06 17:09:06 +01:00
viariables not clear before project load
This commit is contained in:
parent
a308714302
commit
41914362d5
4 changed files with 5 additions and 4 deletions
|
|
@ -511,6 +511,7 @@ bool StoryProject::Load(ResourceManager &manager, NodesFactory &factory)
|
|||
nlohmann::json j = nlohmann::json::parse(f);
|
||||
|
||||
manager.Clear();
|
||||
m_variables.clear();
|
||||
|
||||
if (ParseStoryInformation(j))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ int64_t FloatToScaled(float floatValue, int scalePower) {
|
|||
}
|
||||
|
||||
|
||||
void VariablesWindow::ShowRAMEditor(std::shared_ptr<IStoryProject> story)
|
||||
void VariablesWindow::DrawVariableEditor(std::shared_ptr<IStoryProject> story)
|
||||
{
|
||||
|
||||
if (ImGui::Button("Add variable")) {
|
||||
|
|
@ -114,7 +114,7 @@ void VariablesWindow::Draw(std::shared_ptr<IStoryProject> story)
|
|||
|
||||
if (story)
|
||||
{
|
||||
ShowRAMEditor(story);
|
||||
DrawVariableEditor(story);
|
||||
}
|
||||
|
||||
WindowBase::EndDraw();
|
||||
|
|
|
|||
|
|
@ -14,6 +14,6 @@ public:
|
|||
void Draw(std::shared_ptr<IStoryProject> story);
|
||||
|
||||
private:
|
||||
void ShowRAMEditor(std::shared_ptr<IStoryProject> story);
|
||||
void DrawVariableEditor(std::shared_ptr<IStoryProject> story);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue