From dbd0bb80d40120e51d96b7b5c2723f384bb3f61d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tur=C3=A1nszki=20J=C3=A1nos?= Date: Sat, 21 Jun 2025 16:31:16 +0200 Subject: [PATCH] theme fix: when switching to theme without bg image, previous one will be removed --- Editor/GeneralWindow.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Editor/GeneralWindow.cpp b/Editor/GeneralWindow.cpp index 7a3b38358..ae242f8fe 100644 --- a/Editor/GeneralWindow.cpp +++ b/Editor/GeneralWindow.cpp @@ -461,8 +461,14 @@ void GeneralWindow::Create(EditorComponent* _editor) wi::vector imagedata; archive >> imagedata; static uint64_t cnt = 0; - if(!imagedata.empty()) + if (imagedata.empty()) + { + editor->themeEditorWnd.imageResource = {}; + } + else + { editor->themeEditorWnd.imageResource = wi::resourcemanager::Load(wi::helper::GetCurrentPath() + "/themes/" + imageresourcename, wi::resourcemanager::Flags::IMPORT_RETAIN_FILEDATA, imagedata.data(), imagedata.size()); + } } break; case Theme::Custom: