Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/wolfpld/tracy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartosz Taudul <wolf@nereid.pl>2022-08-16 19:51:28 +0300
committerBartosz Taudul <wolf@nereid.pl>2022-08-16 19:51:28 +0300
commit827bbeb442ca9cd3a6b388079ddda88eda3373b4 (patch)
treedc69fd27d64fba7e03cda836ae9123b9dbeb95fc /server/TracyView_Plots.cpp
parent4bf6a2b9d24d612a31ff5ddf35d65ae030fce08a (diff)
Context menu hide for plots.
Diffstat (limited to 'server/TracyView_Plots.cpp')
-rw-r--r--server/TracyView_Plots.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/server/TracyView_Plots.cpp b/server/TracyView_Plots.cpp
index 03202ab5..f656b268 100644
--- a/server/TracyView_Plots.cpp
+++ b/server/TracyView_Plots.cpp
@@ -98,6 +98,7 @@ int View::DrawPlots( int offset, double pxns, const ImVec2& wpos, bool hover, fl
}
if( v->data.empty() ) continue;
bool& showFull = vis.showFull;
+ ImGui::PushID( &vis );
float txtx = 0;
const auto yPos = AdjustThreadPosition( vis, wpos.y, offset );
@@ -162,6 +163,10 @@ int View::DrawPlots( int offset, double pxns, const ImVec2& wpos, bool hover, fl
{
ZoomToRange( first, last );
}
+ if( IsMouseClicked( 1 ) )
+ {
+ ImGui::OpenPopup( "menuPopup" );
+ }
}
}
@@ -409,9 +414,21 @@ int View::DrawPlots( int offset, double pxns, const ImVec2& wpos, bool hover, fl
offset += PlotHeight;
}
}
+
+ if( ImGui::BeginPopup( "menuPopup" ) )
+ {
+ if( ImGui::MenuItem( ICON_FA_EYE_SLASH " Hide" ) )
+ {
+ vis.visible = false;
+ ImGui::CloseCurrentPopup();
+ }
+ ImGui::EndPopup();
+ }
+
offset += 0.2 * ty;
AdjustThreadHeight( vis, oldOffset, offset );
ImGui::PopClipRect();
+ ImGui::PopID();
}
return offset;