Time label.
[dcpomatic.git] / src / wx / audio_plot.cc
index fb5b92ff30ac36ac695d4448132e270940b88377..8d5184d48133142d7988716207a928c1bccb87b4 100644 (file)
@@ -101,7 +101,7 @@ AudioPlot::paint (wxPaintEvent &)
                return;
        }
 
-       if (!_analysis) {
+       if (!_analysis || _analysis->channels() == 0) {
                gc->SetFont (gc->CreateFont (*wxNORMAL_FONT));
                gc->DrawText (_("Please wait; audio is being analysed..."), 32, 32);
                return;
@@ -130,9 +130,12 @@ AudioPlot::paint (wxPaintEvent &)
                grid.AddLineToPoint (db_label_width + data_width, y);
                gc->DrawText (std_to_wx (String::compose ("%1dB", i)), 0, y - (db_label_height / 2));
        }
+
        gc->SetPen (*wxLIGHT_GREY_PEN);
        gc->StrokePath (grid);
 
+       gc->DrawText (_("Time"), data_width, height - yo + db_label_height / 2);
+
        for (int c = 0; c < MAX_AUDIO_CHANNELS; ++c) {
                if (!_channel_visible[c] || c >= _analysis->channels()) {
                        continue;