diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-02-05 13:57:12 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-02-05 13:57:12 +0100 |
| commit | 377623b67fd390d020276a784e75a08425d9166a (patch) | |
| tree | 77dd4627017a721fa86f097c85c535e9ea30257f | |
| parent | e8af431bd9bfc5f1d6aa33246bdd082bc8b2d17e (diff) | |
Make the timeline look better when there is no content in the film.
| -rw-r--r-- | src/wx/timeline.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/wx/timeline.cc b/src/wx/timeline.cc index d2443c8a9..0d7ae7afb 100644 --- a/src/wx/timeline.cc +++ b/src/wx/timeline.cc @@ -151,6 +151,11 @@ Timeline::paint_labels () { wxPaintDC dc (_labels_canvas); + auto film = _film.lock(); + if (film->content().empty()) { + return; + } + auto gc = wxGraphicsContext::Create (dc); if (!gc) { return; @@ -170,6 +175,12 @@ void Timeline::paint_main () { wxPaintDC dc (_main_canvas); + + auto film = _film.lock(); + if (film->content().empty()) { + return; + } + _main_canvas->DoPrepareDC (dc); auto gc = wxGraphicsContext::Create (dc); |
