projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e8af431
)
Make the timeline look better when there is no content in the film.
author
Carl Hetherington
<cth@carlh.net>
Sun, 5 Feb 2023 12:57:12 +0000
(13:57 +0100)
committer
Carl Hetherington
<cth@carlh.net>
Sun, 5 Feb 2023 12:57:12 +0000
(13:57 +0100)
src/wx/timeline.cc
patch
|
blob
|
history
diff --git
a/src/wx/timeline.cc
b/src/wx/timeline.cc
index d2443c8a974690c1b8b57163dde2bddecafaca56..0d7ae7afbca803a0976857645cf09c863f7f5fd9 100644
(file)
--- 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);