fixed selecting materials in property grid

This commit is contained in:
Mikulas Florek 2020-05-31 16:12:17 +02:00
parent 60b210767a
commit 0dfc6eb8e3

View file

@ -1371,6 +1371,7 @@ struct ModelPropertiesPlugin final : PropertyGrid::IPlugin {
}
if (open) {
for (i32 i = 0; i < count; ++i) {
ImGui::PushID(i);
Material* material = model->getMesh(i).material;
if(count == 1) ImGuiEx::Label("Material");
@ -1381,6 +1382,7 @@ struct ModelPropertiesPlugin final : PropertyGrid::IPlugin {
{
m_app.getAssetBrowser().selectResource(material->getPath(), true, false);
}
ImGui::PopID();
}
if(count > 1) ImGui::TreePop();
}