Merge pull request #1348 from Casqade/fix-multiline-messages-tooltips

Show tooltips for multiline messages
This commit is contained in:
Bartosz Taudul
2026-04-25 18:54:24 +02:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -365,7 +365,7 @@ void View::DrawMessageLine( const MessageData& msg, bool hasCallstack, int& idx
const auto cw = ImGui::GetContentRegionAvail().x;
const auto tw = ImGui::CalcTextSize( text, tend ).x;
ImGui::TextUnformatted( text, tend );
if( tw > cw && ImGui::IsItemHovered() )
if( (tw > cw || *tend != '\0') && ImGui::IsItemHovered() )
{
ImGui::SetNextWindowSize( ImVec2( 1000 * GetScale(), 0 ) );
ImGui::BeginTooltip();

View File

@@ -863,7 +863,7 @@ void View::DrawZoneInfoWindow()
const auto cw = ImGui::GetContentRegionAvail().x;
const auto tw = ImGui::CalcTextSize( text, tend ).x;
ImGui::TextUnformatted( text, tend );
if( tw > cw && ImGui::IsItemHovered() )
if( (tw > cw || *tend != '\0') && ImGui::IsItemHovered() )
{
ImGui::SetNextWindowSize( ImVec2( 1000 * GetScale(), 0 ) );
ImGui::BeginTooltip();