Show preview of lock source locations in options window.

This commit is contained in:
Bartosz Taudul 2021-03-27 13:32:38 +01:00
parent 8f0c5e867e
commit e2be45c0ba
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -8713,6 +8713,9 @@ void View::DrawOptions()
ImGui::SameLine();
}
ImGui::TextDisabled( "(%s) %s:%i", RealToString( l.second->timeline.size() ), fileName, sl.line );
if( ImGui::IsItemHovered() )
{
DrawSourceTooltip( fileName, sl.line, 1, 1 );
if( ImGui::IsItemClicked( 1 ) )
{
if( SourceFileValid( fileName, m_worker.GetCaptureTime(), *this, m_worker ) )
@ -8726,6 +8729,7 @@ void View::DrawOptions()
}
}
}
}
ImGui::TreePop();
}
const bool multiUncontExpand = ImGui::TreeNodeEx( "Uncontended locks present in multiple threads", 0 );
@ -8787,6 +8791,9 @@ void View::DrawOptions()
ImGui::SameLine();
}
ImGui::TextDisabled( "(%s) %s:%i", RealToString( l.second->timeline.size() ), fileName, sl.line );
if( ImGui::IsItemHovered() )
{
DrawSourceTooltip( fileName, sl.line, 1, 1 );
if( ImGui::IsItemClicked( 1 ) )
{
if( SourceFileValid( fileName, m_worker.GetCaptureTime(), *this, m_worker ) )
@ -8800,6 +8807,7 @@ void View::DrawOptions()
}
}
}
}
ImGui::TreePop();
}
const auto singleExpand = ImGui::TreeNodeEx( "Locks present in a single thread", 0 );
@ -8861,6 +8869,9 @@ void View::DrawOptions()
ImGui::SameLine();
}
ImGui::TextDisabled( "(%s) %s:%i", RealToString( l.second->timeline.size() ), fileName, sl.line );
if( ImGui::IsItemHovered() )
{
DrawSourceTooltip( fileName, sl.line, 1, 1 );
if( ImGui::IsItemClicked( 1 ) )
{
if( SourceFileValid( fileName, m_worker.GetCaptureTime(), *this, m_worker ) )
@ -8874,6 +8885,7 @@ void View::DrawOptions()
}
}
}
}
ImGui::TreePop();
}
ImGui::TreePop();