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-03 20:18:01 +0300
committerBartosz Taudul <wolf@nereid.pl>2022-09-03 20:18:01 +0300
commite19a3a8767cb54218fdf528279a804299213e801 (patch)
tree4441b5d5d452678bf4463e3419a09e6416186d6c /server
parent450fbf5ea0485ffe6b8d9d1437b031ab670254db (diff)
Implement check for empty plot.
Diffstat (limited to 'server')
-rw-r--r--server/TracyTimelineItemPlot.cpp5
-rw-r--r--server/TracyTimelineItemPlot.hpp1
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; }