From 626f3ee48d0f96160c8134f2db176089086f5a96 Mon Sep 17 00:00:00 2001 From: Mikulas Florek Date: Tue, 19 Nov 2024 22:21:51 +0100 Subject: [PATCH] hierarchy - select all filtered --- src/editor/studio_app.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/editor/studio_app.cpp b/src/editor/studio_app.cpp index 93ed2e8965..ffbed7f563 100644 --- a/src/editor/studio_app.cpp +++ b/src/editor/studio_app.cpp @@ -456,6 +456,12 @@ struct StudioAppImpl final : StudioApp { ImGui::PushItemWidth(ImGui::GetContentRegionAvail().x - ImGui::GetStyle().FramePadding.x); if (filter.isActive()) { + bool select_all = false; + if (m_app.checkShortcut(m_app.getCommonActions().select_all)) { + select_all = true; + editor.selectEntities({}, false); + } + for (EntityPtr e = world->getFirstEntity(); e.isValid(); e = world->getNextEntity((EntityRef)e)) { char buffer[1024]; getEntityListDisplayName(m_app, *world, Span(buffer), e); @@ -463,6 +469,9 @@ struct StudioAppImpl final : StudioApp { ImGui::PushID(e.index); const EntityRef e_ref = (EntityRef)e; + if (select_all) { + editor.selectEntities(Span(&e_ref, 1), true); + } if (select_first) { select_first = false; editor.selectEntities(Span(&e_ref, 1), false);