Context menu hide of GPU zones.

This commit is contained in:
Bartosz Taudul 2022-08-16 18:43:13 +02:00
parent fa8a071334
commit 3aa62a18cc
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -318,6 +318,7 @@ void View::DrawTimeline()
continue;
}
bool& showFull = vis.showFull;
ImGui::PushID( &vis );
const auto yPos = AdjustThreadPosition( vis, wpos.y, offset );
const auto oldOffset = offset;
@ -468,6 +469,10 @@ void View::DrawTimeline()
ZoomToRange( t0, t1 );
}
}
if( IsMouseClicked( 1 ) )
{
ImGui::OpenPopup( "menuPopup" );
}
ImGui::BeginTooltip();
ImGui::TextUnformatted( buf );
@ -570,8 +575,19 @@ void View::DrawTimeline()
}
}
if( ImGui::BeginPopup( "menuPopup" ) )
{
if( ImGui::MenuItem( ICON_FA_EYE_SLASH " Hide" ) )
{
vis.visible = false;
ImGui::CloseCurrentPopup();
}
ImGui::EndPopup();
}
AdjustThreadHeight( vis, oldOffset, offset );
ImGui::PopClipRect();
ImGui::PopID();
}
}