bool automation)
: TimeAxisViewItem (r->name(), *parent, tv, spu, basic_color, r->position(), r->length(), false, automation,
(automation ? TimeAxisViewItem::ShowFrame :
- TimeAxisViewItem::Visibility (TimeAxisViewItem::ShowNameText|
+ TimeAxisViewItem::Visibility ((UIConfiguration::instance().get_show_region_name() ? TimeAxisViewItem::ShowNameText : 0) |
TimeAxisViewItem::ShowNameHighlight| TimeAxisViewItem::ShowFrame)))
, _region (r)
, sync_mark(0)
{
samplecnt_t shortest = max_samplecnt;
- /* remove old silent samples */
+ /* remove old silent frames */
drop_silent_frames ();
if (silences.empty()) {
unit_length = _region->length() / samples_per_pixel;
- for (vector<GhostRegion*>::iterator i = ghosts.begin(); i != ghosts.end(); ++i) {
+ for (vector<GhostRegion*>::iterator i = ghosts.begin(); i != ghosts.end(); ++i) {
- (*i)->set_duration (unit_length);
+ (*i)->set_duration (unit_length);
- }
+ }
}
}
}
/* Only trim region on the left if the first sample has gone beyond the left region's last sample. */
- if (region_left != 0 && (region_left->last_sample() > _region->first_sample() || regions_touching)) {
+ if (region_left != 0 && (region_left->last_sample() > _region->first_sample() || regions_touching)) {
region_left->trim_end (_region->first_sample() - 1);
}
}
/* back to region relative, keeping the relevant divisor */
return MusicSample (sample.sample - _region->position(), sample.division);
}
+
+void
+RegionView::update_visibility ()
+{
+ /* currently only the name visibility can be changed dynamically */
+
+ if (UIConfiguration::instance().get_show_region_name()) {
+ visibility = Visibility (visibility | ShowNameText);
+ } else {
+ visibility = Visibility (visibility & ~ShowNameText);
+ }
+
+ manage_name_text ();
+}