theme fix: when switching to theme without bg image, previous one will be removed

This commit is contained in:
Turánszki János
2025-06-21 16:31:16 +02:00
parent dc42ad58a0
commit dbd0bb80d4
+7 -1
View File
@@ -461,8 +461,14 @@ void GeneralWindow::Create(EditorComponent* _editor)
wi::vector<uint8_t> 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: