summaryrefslogtreecommitdiff
path: root/src/wx/audio_plot.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-02-25 19:27:58 +0000
committerCarl Hetherington <cth@carlh.net>2013-02-25 19:27:58 +0000
commit8bfb6ae0780b0bf3318c345df78518ad3fabc9fc (patch)
treec423e4619fff25b91f85eaa5f4509dc26fda218c /src/wx/audio_plot.cc
parentd371988d26f8c9c4240dc3794df044cbe95d5d0d (diff)
Tidy up creation of analysis a bit.
Diffstat (limited to 'src/wx/audio_plot.cc')
-rw-r--r--src/wx/audio_plot.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/wx/audio_plot.cc b/src/wx/audio_plot.cc
index 1ad07fcce..41d074dad 100644
--- a/src/wx/audio_plot.cc
+++ b/src/wx/audio_plot.cc
@@ -65,15 +65,17 @@ AudioPlot::paint (wxPaintEvent &)
{
wxPaintDC dc (this);
- if (!_analysis) {
- return;
- }
-
wxGraphicsContext* gc = wxGraphicsContext::Create (dc);
if (!gc) {
return;
}
+ if (!_analysis) {
+ gc->SetFont (gc->CreateFont (*wxNORMAL_FONT));
+ gc->DrawText (_("Please wait; audio is being analysed..."), 32, 32);
+ return;
+ }
+
int const width = GetSize().GetWidth();
float const xs = width / float (_analysis->points (_channel));
int const height = GetSize().GetHeight ();