Gtk::Window* win = Tabbable::use_own_window (and_fill_it);
-
if (win && new_window) {
win->set_name ("MixerWindow");
ARDOUR_UI::instance()->setup_toplevel_window (*win, _("Mixer"), this);
win->signal_event().connect (sigc::bind (sigc::ptr_fun (&Keyboard::catch_user_event_for_pre_dialog_focus), win));
win->set_data ("ardour-bindings", bindings);
update_title ();
+ if (!win->get_focus()) {
+ /* set focus widget to something, anything */
+ win->set_focus (scroller);
+ }
}
return win;
SortByNewDisplayOrder cmp;
sort (sorted.begin(), sorted.end(), cmp);
for (OrderingKeys::iterator sr = sorted.begin(); sr != sorted.end(); ++sr, ++n) {
+ if (_session->master_out() && (_session->master_out()->presentation_info().order() == n)) {
+ ++n;
+ }
if (sr->old_display_order != n) {
change = true;
+ break;
}
}
if (change) {
n = 0;
for (OrderingKeys::iterator sr = sorted.begin(); sr != sorted.end(); ++sr, ++n) {
+ if (_session->master_out() && (_session->master_out()->presentation_info().order() == n)) {
+ ++n;
+ }
if (sr->stripable->presentation_info().order() != n) {
sr->stripable->set_presentation_order (n);
}
}
}
- if (!_selection.axes.empty()) {
+ if (!_selection.axes.empty() && !PublicEditor::instance().track_selection_change_without_scroll ()) {
move_stripable_into_view ((*_selection.axes.begin())->stripable());
}
}
AxisView* av = (*i)[stripable_columns.strip];
MixerStrip* strip = dynamic_cast<MixerStrip*> (av);
+ bool const visible = (*i)[stripable_columns.visible];
if (!strip) {
/* we're in the middle of changing a row, don't worry */
}
}
- if (slaved) {
+ if (slaved && visible) {
if (strip->packed()) {
strip_packer.reorder_child (*strip, -1); /* put at end */
#endif
bool found = false;
int x0 = 0;
+ Gtk::Allocation alloc;
for (list<MixerStrip *>::const_iterator i = strips.begin(); i != strips.end(); ++i) {
if ((*i)->route() == s) {
int y;
found = true;
(*i)->translate_coordinates (strip_packer, 0, 0, x0, y);
+ alloc = (*i)->get_allocation ();
break;
}
}
}
Adjustment* adj = scroller.get_hscrollbar()->get_adjustment();
- scroller.get_hscrollbar()->set_value (max (adj->get_lower(), min (adj->get_upper(), x0 - 1.0)));
+
+ if (x0 < adj->get_value()) {
+ adj->set_value (max (adj->get_lower(), min (adj->get_upper(), (double) x0)));
+ } else if (x0 + alloc.get_width() >= adj->get_value() + adj->get_page_size()) {
+ int x1 = x0 + alloc.get_width() - adj->get_page_size();
+ adj->set_value (max (adj->get_lower(), min (adj->get_upper(), (double) x1)));
+ }
}
void
Mixer_UI::vca_assign (boost::shared_ptr<VCA> vca)
{
set_axis_targets_for_operation ();
-#if 0
BOOST_FOREACH(AxisView* r, _axis_targets) {
MixerStrip* ms = dynamic_cast<MixerStrip*> (r);
if (ms) {
ms->vca_assign (vca);
}
}
-#endif
}
void
Mixer_UI::vca_unassign (boost::shared_ptr<VCA> vca)
{
set_axis_targets_for_operation ();
-#if 0
BOOST_FOREACH(AxisView* r, _axis_targets) {
MixerStrip* ms = dynamic_cast<MixerStrip*> (r);
if (ms) {
ms->vca_unassign (vca);
}
}
-#endif
}