Editor::get_onscreen_tracks (TrackViewList& tvl)
{
for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {
- if ((*i)->y_position() < _canvas_height) {
+ if ((*i)->y_position() < _visible_canvas_height) {
tvl.push_back (*i);
}
}
{
vector<RegionView*> all_equivalent_regions;
- get_regions_corresponding_to (region, all_equivalent_regions);
+ get_regions_corresponding_to (region, all_equivalent_regions, region->whole_file());
if (all_equivalent_regions.empty()) {
return;
bool have_midi = false;
bool have_locked = false;
bool have_unlocked = false;
+ bool have_video_locked = false;
+ bool have_video_unlocked = false;
bool have_position_lock_style_audio = false;
bool have_position_lock_style_music = false;
bool have_muted = false;
have_unlocked = true;
}
+ if (r->video_locked()) {
+ have_video_locked = true;
+ } else {
+ have_video_unlocked = true;
+ }
+
if (r->position_lock_style() == MusicTime) {
have_position_lock_style_music = true;
} else {
_region_actions->get_action("show-region-properties")->set_sensitive (false);
_region_actions->get_action("rename-region")->set_sensitive (false);
if (have_audio) {
+ /* XXX need to check whether there is than 1 per
+ playlist, because otherwise this makes no sense.
+ */
_region_actions->get_action("combine-regions")->set_sensitive (true);
} else {
_region_actions->get_action("combine-regions")->set_sensitive (false);
// a->set_inconsistent ();
}
+ a = Glib::RefPtr<ToggleAction>::cast_dynamic (_region_actions->get_action("toggle-region-video-lock"));
+ a->set_active (have_video_locked && !have_video_unlocked);
+ if (have_video_locked && have_video_unlocked) {
+ // a->set_inconsistent ();
+ }
+
a = Glib::RefPtr<ToggleAction>::cast_dynamic (_region_actions->get_action("toggle-region-lock-style"));
a->set_active (have_position_lock_style_music && !have_position_lock_style_audio);
list<Selectable *> touched;
if (after) {
- start = cursor->current_frame;
+ start = cursor->current_frame();
end = _session->current_end_frame();
} else {
- if (cursor->current_frame > 0) {
+ if (cursor->current_frame() > 0) {
start = 0;
- end = cursor->current_frame - 1;
+ end = cursor->current_frame() - 1;
} else {
return;
}
framepos_t m;
bool ignored;
- /* in range mode, use any existing selection */
+ /* if an explicit range exists, use it */
- if (mouse_mode == MouseRange && !selection->time.empty()) {
+ if (!selection->time.empty()) {
/* we know that these are ordered */
start = selection->time.start();
end = selection->time.end_frame();