small fises in deleting Transformables WIP
This commit is contained in:
@@ -123,6 +123,8 @@ void TSE::EDITOR::HirearchieView::MenuBar()
|
||||
ImGui::EndMenuBar();
|
||||
}
|
||||
|
||||
bool selectedFound = false;
|
||||
|
||||
void TSE::EDITOR::HirearchieView::DisplayLayer(Layer *l)
|
||||
{
|
||||
ImGui::Indent(20.0f);
|
||||
@@ -180,10 +182,15 @@ void TSE::EDITOR::HirearchieView::DisplayLayer(Layer *l)
|
||||
}
|
||||
if(collapseOpen)
|
||||
{
|
||||
selectedFound = false;
|
||||
for(int i = 0; i < l->GetAllObjects().size(); i++)
|
||||
{
|
||||
DisplayObj(l->GetAllObjects()[i], l);
|
||||
}
|
||||
if(!selectedFound && PropertiesView::GetCurrentInspectableType() == InspectableType::Transformable)
|
||||
{
|
||||
PropertiesView::ForceClearInspectorElement();
|
||||
}
|
||||
}
|
||||
ImGui::Unindent(20.0f);
|
||||
}
|
||||
@@ -198,8 +205,10 @@ void TSE::EDITOR::HirearchieView::DisplayObj(Transformable *t, Layer *l)
|
||||
if(selected == t->id)
|
||||
{
|
||||
flags |= ImGuiTreeNodeFlags_Selected;
|
||||
selectedFound = true;
|
||||
}
|
||||
bool open = ImGui::TreeNodeEx((t->GetName() + "##" + to_string(t->id)).c_str(), flags);
|
||||
string name = t->GetName() + "##" + to_string(t->id);
|
||||
bool open = ImGui::TreeNodeEx((name).c_str(), flags);
|
||||
if(ImGui::BeginPopupContextItem())
|
||||
{
|
||||
bool disabled = false;
|
||||
|
||||
Reference in New Issue
Block a user