Implement check for empty plot.

This commit is contained in:
Bartosz Taudul 2022-09-03 19:18:01 +02:00
parent 450fbf5ea0
commit e19a3a8767
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3
2 changed files with 6 additions and 0 deletions

View File

@ -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];

View File

@ -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; }