13
0

region property editor uses clock mode based on region time domain

Still needs to track changes
This commit is contained in:
Paul Davis 2023-07-21 21:15:44 -06:00
parent a4b43a6f69
commit 908c530834

View File

@ -68,8 +68,15 @@ RegionEditor::RegionEditor (Session* s, std::shared_ptr<Region> r)
{ {
set_session (s); set_session (s);
_clock_group->set_clock_mode (ARDOUR_UI::instance()->primary_clock->mode()); switch (r->time_domain()) {
ARDOUR_UI::instance()->primary_clock->mode_changed.connect (sigc::mem_fun (*this, &RegionEditor::set_clock_mode_from_primary)); case Temporal::AudioTime:
/* XXX check length of region and choose samples or minsec */
_clock_group->set_clock_mode (AudioClock::MinSec);
break;
default:
_clock_group->set_clock_mode (AudioClock::BBT);
}
// ARDOUR_UI::instance()->primary_clock->mode_changed.connect (sigc::mem_fun (*this, &RegionEditor::set_clock_mode_from_primary));
_clock_group->add (position_clock); _clock_group->add (position_clock);
_clock_group->add (end_clock); _clock_group->add (end_clock);