mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-29 16:54:35 +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();
|
ImGui::SameLine();
|
||||||
if( ImGui::BeginCombo( "##frameCombo", nullptr, ImGuiComboFlags_NoPreview ) )
|
if( ImGui::BeginCombo( "##frameCombo", nullptr, ImGuiComboFlags_NoPreview ) )
|
||||||
{
|
{
|
||||||
|
int idxRemove = -1;
|
||||||
const auto sz = std::min<size_t>( 5, connHistVec.size() );
|
const auto sz = std::min<size_t>( 5, connHistVec.size() );
|
||||||
for( size_t i=0; i<sz; i++ )
|
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 );
|
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();
|
ImGui::EndCombo();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user