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
path: root/server
diff options
context:
space:
mode:
authorBartosz Taudul <wolf@nereid.pl>2022-09-04 15:22:12 +0300
committerBartosz Taudul <wolf@nereid.pl>2022-09-04 15:31:00 +0300
commit9c464e9f05ab7a2dca880f9870d1cd510eaf6e82 (patch)
tree74704a4283196d09ed03643f6f2c4bbd17c4fc26 /server
parent135d3b7f3036bbdfa5de67e884b59af2c7149a6f (diff)
Make timeline item visibility functions virtual.
Diffstat (limited to 'server')
-rw-r--r--server/TracyTimelineItem.cpp4
-rw-r--r--server/TracyTimelineItem.hpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/server/TracyTimelineItem.cpp b/server/TracyTimelineItem.cpp
index 4ab65270..e0a82efa 100644
--- a/server/TracyTimelineItem.cpp
+++ b/server/TracyTimelineItem.cpp
@@ -20,7 +20,7 @@ TimelineItem::TimelineItem( View& view, Worker& worker )
void TimelineItem::Draw( bool firstFrame, double pxns, int& offset, const ImVec2& wpos, bool hover, float yMin, float yMax )
{
- if( !m_visible )
+ if( !IsVisible() )
{
m_height = 0;
m_offset = 0;
@@ -109,7 +109,7 @@ void TimelineItem::Draw( bool firstFrame, double pxns, int& offset, const ImVec2
{
if( ImGui::MenuItem( ICON_FA_EYE_SLASH " Hide" ) )
{
- m_visible = false;
+ SetVisible( false );
ImGui::CloseCurrentPopup();
}
ImGui::EndPopup();
diff --git a/server/TracyTimelineItem.hpp b/server/TracyTimelineItem.hpp
index 5c5460c2..59652328 100644
--- a/server/TracyTimelineItem.hpp
+++ b/server/TracyTimelineItem.hpp
@@ -20,8 +20,8 @@ public:
void Draw( bool firstFrame, double pxns, int& offset, const ImVec2& wpos, bool hover, float yMin, float yMax );
void VisibilityCheckbox();
- void SetVisible( bool visible ) { m_visible = visible; }
- bool IsVisible() const { return m_visible; }
+ virtual void SetVisible( bool visible ) { m_visible = visible; }
+ virtual bool IsVisible() const { return m_visible; }
protected:
virtual uint32_t HeaderColor() const = 0;