mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 07:54:36 +00:00
Allow removal of addresses from connection history.
This commit is contained in:
parent
a234510ef3
commit
78beb7bd81
@ -276,6 +276,7 @@ int main( int argc, char** argv )
|
||||
ImGui::SameLine();
|
||||
if( ImGui::BeginCombo( "##frameCombo", nullptr, ImGuiComboFlags_NoPreview ) )
|
||||
{
|
||||
int idxRemove = -1;
|
||||
const auto sz = std::min<size_t>( 5, connHistVec.size() );
|
||||
for( size_t i=0; i<sz; i++ )
|
||||
{
|
||||
@ -284,6 +285,15 @@ int main( int argc, char** argv )
|
||||
{
|
||||
memcpy( addr, str.c_str(), str.size() + 1 );
|
||||
}
|
||||
if( ImGui::IsItemHovered() && ImGui::IsKeyPressed( ImGui::GetKeyIndex( ImGuiKey_Delete ), false ) )
|
||||
{
|
||||
idxRemove = (int)i;
|
||||
}
|
||||
}
|
||||
if( idxRemove >= 0 )
|
||||
{
|
||||
connHistMap.erase( connHistVec[idxRemove] );
|
||||
connHistVec = RebuildConnectionHistory( connHistMap );
|
||||
}
|
||||
ImGui::EndCombo();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user