fixed selecting materials in property grid
This commit is contained in:
parent
60b210767a
commit
0dfc6eb8e3
1 changed files with 2 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue