From 0cedfdac082e7061e74073729ef184388c16900e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tur=C3=A1nszki=20J=C3=A1nos?= Date: Wed, 23 Nov 2022 17:38:30 +0100 Subject: [PATCH] editor: script window file name stuck fix --- Editor/ScriptWindow.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Editor/ScriptWindow.cpp b/Editor/ScriptWindow.cpp index 325845a72..47867e96d 100644 --- a/Editor/ScriptWindow.cpp +++ b/Editor/ScriptWindow.cpp @@ -20,7 +20,7 @@ void ScriptWindow::Create(EditorComponent* _editor) editor->RecordEntity(archive, entity); editor->optionsWnd.RefreshEntityTree(); - }); + }); float hei = 20; float wid = 100; @@ -96,9 +96,6 @@ void ScriptWindow::Create(EditorComponent* _editor) void ScriptWindow::SetEntity(wi::ecs::Entity entity) { - if (this->entity == entity) - return; - this->entity = entity; wi::scene::Scene& scene = editor->GetCurrentScene(); @@ -116,6 +113,10 @@ void ScriptWindow::SetEntity(wi::ecs::Entity entity) } playonceCheckBox.SetCheck(script->IsPlayingOnlyOnce()); } + else + { + fileButton.SetText("Open File..."); + } } void ScriptWindow::Update(const wi::Canvas& canvas, float dt)