remove some nutempo #warnings and fix up Location time domain API

This commit is contained in:
Paul Davis 2021-01-25 11:40:48 -07:00
parent a8f9f268b4
commit 9d4d3908e6
4 changed files with 6 additions and 17 deletions

View File

@ -177,7 +177,7 @@ Editor::add_new_location_internal (Location* location)
}
location->name_changed.connect (*this, invalidator (*this), boost::bind (&Editor::location_changed, this, _1), gui_context());
location->position_time_domain_changed.connect (*this, invalidator (*this), boost::bind (&Editor::location_changed, this, _1), gui_context());
location->TimeDomainChanged.connect (*this, invalidator (*this), boost::bind (&Editor::location_changed, this, location), gui_context());
location->FlagsChanged.connect (*this, invalidator (*this), boost::bind (&Editor::location_flags_changed, this, location), gui_context());
pair<Location*,LocationMarkers*> newpair;

View File

@ -130,7 +130,6 @@ public:
static PBD::Signal1<void,Location*> start_changed;
static PBD::Signal1<void,Location*> flags_changed;
static PBD::Signal1<void,Location*> lock_changed;
static PBD::Signal1<void,Location*> position_time_domain_changed;
/* this is sent only when both start and end change at the same time */
static PBD::Signal1<void,Location*> changed;

View File

@ -61,7 +61,6 @@ PBD::Signal1<void,Location*> Location::end_changed;
PBD::Signal1<void,Location*> Location::start_changed;
PBD::Signal1<void,Location*> Location::flags_changed;
PBD::Signal1<void,Location*> Location::lock_changed;
PBD::Signal1<void,Location*> Location::position_time_domain_changed;
PBD::Signal1<void,Location*> Location::changed;
Location::Location (Session& s)
@ -650,15 +649,9 @@ Location::set_position_time_domain (TimeDomain domain)
return;
}
if (domain == Temporal::BeatTime) {
_start = timepos_t (_start.beats());
_end = timepos_t (_end.beats());
} else {
_start = timepos_t (_start.samples());
_end = timepos_t (_end.samples());
}
_start.set_time_domain (domain);
_end.set_time_domain (domain);
position_time_domain_changed (this); /* EMIT SIGNAL */
TimeDomainChanged (); /* EMIT SIGNAL */
}

View File

@ -1932,8 +1932,7 @@ Session::location_added (Location *location)
location->EndChanged.connect_same_thread (skip_update_connections, boost::bind (&Session::update_marks, this, location));
location->Changed.connect_same_thread (skip_update_connections, boost::bind (&Session::update_marks, this, location));
location->FlagsChanged.connect_same_thread (skip_update_connections, boost::bind (&Session::update_marks, this, location));
#warning NUTEMPO can locations have their lock style changed and how
// location->PositionLockStyleChanged.connect_same_thread (skip_update_connections, boost::bind (&Session::update_marks, this, location));
location->TimeDomainChanged.connect_same_thread (skip_update_connections, boost::bind (&Session::update_marks, this, location));
}
if (location->is_range_marker()) {
@ -1943,8 +1942,7 @@ Session::location_added (Location *location)
location->EndChanged.connect_same_thread (skip_update_connections, boost::bind (&Session::update_marks, this, location));
location->Changed.connect_same_thread (skip_update_connections, boost::bind (&Session::update_marks, this, location));
location->FlagsChanged.connect_same_thread (skip_update_connections, boost::bind (&Session::update_marks, this, location));
#warning NUTEMPO can locations have their lock style changed and how
// location->PositionLockStyleChanged.connect_same_thread (skip_update_connections, boost::bind (&Session::update_marks, this, location));
location->TimeDomainChanged.connect_same_thread (skip_update_connections, boost::bind (&Session::update_marks, this, location));
}
if (location->is_skip()) {
@ -1954,8 +1952,7 @@ Session::location_added (Location *location)
location->EndChanged.connect_same_thread (skip_update_connections, boost::bind (&Session::update_skips, this, location, true));
location->Changed.connect_same_thread (skip_update_connections, boost::bind (&Session::update_skips, this, location, true));
location->FlagsChanged.connect_same_thread (skip_update_connections, boost::bind (&Session::update_skips, this, location, false));
#warning NUTEMPO can locations have their lock style changed and how
// location->PositionLockStyleChanged.connect_same_thread (skip_update_connections, boost::bind (&Session::update_marks, this, location));
location->TimeDomainChanged.connect_same_thread (skip_update_connections, boost::bind (&Session::update_marks, this, location));
update_skips (location, true);
}