diff options
author | Bartosz Taudul <wolf@nereid.pl> | 2022-09-03 20:18:01 +0300 |
---|---|---|
committer | Bartosz Taudul <wolf@nereid.pl> | 2022-09-03 20:18:01 +0300 |
commit | e19a3a8767cb54218fdf528279a804299213e801 (patch) | |
tree | 4441b5d5d452678bf4463e3419a09e6416186d6c /server | |
parent | 450fbf5ea0485ffe6b8d9d1437b031ab670254db (diff) |
Implement check for empty plot.
Diffstat (limited to 'server')
-rw-r--r-- | server/TracyTimelineItemPlot.cpp | 5 | ||||
-rw-r--r-- | server/TracyTimelineItemPlot.hpp | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/server/TracyTimelineItemPlot.cpp b/server/TracyTimelineItemPlot.cpp index 83c8920f..6d306779 100644 --- a/server/TracyTimelineItemPlot.cpp +++ b/server/TracyTimelineItemPlot.cpp @@ -14,6 +14,11 @@ TimelineItemPlot::TimelineItemPlot( View& view, Worker& worker, PlotData* plot ) { } +bool TimelineItemPlot::IsEmpty() const +{ + return m_plot->data.empty(); +} + const char* TimelineItemPlot::HeaderLabel() const { static char tmp[1024]; diff --git a/server/TracyTimelineItemPlot.hpp b/server/TracyTimelineItemPlot.hpp index 30ebed22..4e3b6e05 100644 --- a/server/TracyTimelineItemPlot.hpp +++ b/server/TracyTimelineItemPlot.hpp @@ -13,6 +13,7 @@ public: TimelineItemPlot( View& view, Worker& worker, PlotData* plot ); void DrawContents( double pxns, int& offset, const ImVec2& wpos, bool hover, float yMin, float yMax ) override; + bool IsEmpty() const override; protected: uint32_t HeaderColor() const override { return 0xFF44DDDD; } |