add Editor::default_time_domain()
Not 100% certain about the logic here, but at least the method exists now
This commit is contained in:
parent
af9bc21a07
commit
5074553f15
@ -6410,3 +6410,13 @@ Editor::duration_to_pixels_unrounded (timecnt_t const & dur) const
|
||||
{
|
||||
return sample_to_pixel_unrounded (dur.samples());
|
||||
}
|
||||
|
||||
Temporal::TimeDomain
|
||||
Editor::default_time_domain () const
|
||||
{
|
||||
if (_grid_type == GridTypeNone || _snap_mode == SnapOff) {
|
||||
return AudioTime;
|
||||
}
|
||||
|
||||
return BeatTime;
|
||||
}
|
||||
|
@ -168,6 +168,8 @@ public:
|
||||
|
||||
bool pending_locate_request() const { return _pending_locate_request; }
|
||||
|
||||
Temporal::TimeDomain default_time_domain() const;
|
||||
|
||||
samplepos_t leftmost_sample() const { return _leftmost_sample; }
|
||||
|
||||
samplecnt_t current_page_samples() const {
|
||||
|
@ -130,6 +130,11 @@ public:
|
||||
|
||||
virtual void setup_tooltips() = 0;
|
||||
|
||||
/* returns the time domain to be used when there's no other overriding
|
||||
* reason to choose one.
|
||||
*/
|
||||
virtual Temporal::TimeDomain default_time_domain() const = 0;
|
||||
|
||||
/** Attach this editor to a Session.
|
||||
* @param s Session to connect to.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user