projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ef25237
)
Move y_pos to TimelineView.
author
Carl Hetherington
<cth@carlh.net>
Sun, 20 Nov 2022 23:24:31 +0000
(
00:24
+0100)
committer
Carl Hetherington
<cth@carlh.net>
Sun, 20 Nov 2022 23:24:31 +0000
(
00:24
+0100)
src/wx/timeline_content_view.cc
patch
|
blob
|
history
src/wx/timeline_content_view.h
patch
|
blob
|
history
src/wx/timeline_view.cc
patch
|
blob
|
history
src/wx/timeline_view.h
patch
|
blob
|
history
diff --git
a/src/wx/timeline_content_view.cc
b/src/wx/timeline_content_view.cc
index 633110c18f9e0d55accdf2fde9770a8ab745e242..5d039d0d3f0a2e82d252da234f63519b8eb4864e 100644
(file)
--- a/
src/wx/timeline_content_view.cc
+++ b/
src/wx/timeline_content_view.cc
@@
-171,13
+171,6
@@
TimelineContentView::do_paint (wxGraphicsContext* gc, list<dcpomatic::Rect<int>>
}
}
-int
-TimelineContentView::y_pos (int t) const
-{
- return t * _timeline.pixels_per_track() + _timeline.tracks_y_offset();
-}
-
-
void
TimelineContentView::content_change (ChangeType type, int p)
{
void
TimelineContentView::content_change (ChangeType type, int p)
{
diff --git
a/src/wx/timeline_content_view.h
b/src/wx/timeline_content_view.h
index 48ca6ed79e49a94731f6887bdb52f9a121511622..aa9832e5db14453accce3c2ae88fa17587d261e8 100644
(file)
--- a/
src/wx/timeline_content_view.h
+++ b/
src/wx/timeline_content_view.h
@@
-64,7
+64,6
@@
protected:
private:
void do_paint (wxGraphicsContext* gc, std::list<dcpomatic::Rect<int>> overlaps) override;
private:
void do_paint (wxGraphicsContext* gc, std::list<dcpomatic::Rect<int>> overlaps) override;
- int y_pos (int t) const;
void content_change (ChangeType type, int p);
boost::optional<int> _track;
void content_change (ChangeType type, int p);
boost::optional<int> _track;
diff --git
a/src/wx/timeline_view.cc
b/src/wx/timeline_view.cc
index 10d6dc5beb9d1e4f4d9cf9e1d584ca5c629ce7e5..2897c98e35398a27d83c13c875d6d016b90cc3c3 100644
(file)
--- a/
src/wx/timeline_view.cc
+++ b/
src/wx/timeline_view.cc
@@
-58,3
+58,12
@@
TimelineView::time_x (DCPTime t) const
{
return t.seconds() * _timeline.pixels_per_second().get_value_or(0);
}
{
return t.seconds() * _timeline.pixels_per_second().get_value_or(0);
}
+
+
+int
+TimelineView::y_pos(int t) const
+{
+ return t * _timeline.pixels_per_track() + _timeline.tracks_y_offset();
+}
+
+
diff --git
a/src/wx/timeline_view.h
b/src/wx/timeline_view.h
index f3aa4d5e65ad9983e2490398318eff4762c085d4..166a1121a80df30432a08979dc11c07be043e647 100644
(file)
--- a/
src/wx/timeline_view.h
+++ b/
src/wx/timeline_view.h
@@
-52,6
+52,7
@@
protected:
virtual void do_paint (wxGraphicsContext *, std::list<dcpomatic::Rect<int>> overlaps) = 0;
int time_x (dcpomatic::DCPTime t) const;
virtual void do_paint (wxGraphicsContext *, std::list<dcpomatic::Rect<int>> overlaps) = 0;
int time_x (dcpomatic::DCPTime t) const;
+ int y_pos(int t) const;
Timeline& _timeline;
Timeline& _timeline;