From 71e9f52099f9bbd285204b00987a6b9b4db3f769 Mon Sep 17 00:00:00 2001 From: Erik Abair Date: Wed, 18 Dec 2024 18:31:41 -0800 Subject: [PATCH] Magiclysm: Fix assertion failure due to resizing child window Fixes #78476 --- src/magic.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/magic.cpp b/src/magic.cpp index a5e591525165c..25833e56fdb34 100644 --- a/src/magic.cpp +++ b/src/magic.cpp @@ -3194,8 +3194,9 @@ void spellbook_callback::refresh( uilist *menu ) { ImGui::TableSetColumnIndex( 2 ); ImVec2 info_size = ImGui::GetContentRegionAvail(); - if( ImGui::BeginChild( "spellbook info", info_size, ImGuiChildFlags_None, - ImGuiWindowFlags_AlwaysAutoResize ) ) { + if( ImGui::BeginChild( "spellbook info", info_size, + ImGuiChildFlags_AlwaysAutoResize | ImGuiChildFlags_AutoResizeX | ImGuiChildFlags_AutoResizeY, + ImGuiWindowFlags_None ) ) { if( menu->selected >= 0 && static_cast( menu->selected ) < spells.size() ) { draw_spellbook_info( spells[menu->selected] ); }