mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-30 09:14:36 +00:00
Make zone info child list "selectable".
This commit is contained in:
parent
a7e7f59f96
commit
f44e9bbd7b
@ -2458,21 +2458,15 @@ void View::DrawZoneInfoWindow()
|
|||||||
{
|
{
|
||||||
auto& cev = *ev.child[cti[i]];
|
auto& cev = *ev.child[cti[i]];
|
||||||
const auto& csl = m_worker.GetSourceLocation( cev.srcloc );
|
const auto& csl = m_worker.GetSourceLocation( cev.srcloc );
|
||||||
if( csl.name.active )
|
const auto txt = csl.name.active ? m_worker.GetString( csl.name ) : m_worker.GetString( csl.function );
|
||||||
|
bool b = false;
|
||||||
|
if( ImGui::Selectable( txt, &b, ImGuiSelectableFlags_SpanAllColumns ) )
|
||||||
{
|
{
|
||||||
ImGui::Text( "%s", m_worker.GetString( csl.name ) );
|
m_zoneInfoWindow = &cev;
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ImGui::Text( "%s", m_worker.GetString( csl.function ) );
|
|
||||||
}
|
}
|
||||||
if( ImGui::IsItemHovered() )
|
if( ImGui::IsItemHovered() )
|
||||||
{
|
{
|
||||||
m_zoneHighlight = &cev;
|
m_zoneHighlight = &cev;
|
||||||
if( ImGui::IsMouseClicked( 0 ) )
|
|
||||||
{
|
|
||||||
m_zoneInfoWindow = &cev;
|
|
||||||
}
|
|
||||||
if( ImGui::IsMouseClicked( 2 ) )
|
if( ImGui::IsMouseClicked( 2 ) )
|
||||||
{
|
{
|
||||||
ZoomToZone( cev );
|
ZoomToZone( cev );
|
||||||
|
Loading…
Reference in New Issue
Block a user