theme fix: when switching to theme without bg image, previous one will be removed
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user