#include <boost/foreach.hpp>
+#include <glibmm/threads.h>
+
#include <gtkmm/accelmap.h>
+#include <gtkmm/stock.h>
#include "pbd/convert.h"
#include "pbd/stacktrace.h"
#include "public_editor.h"
#include "mouse_cursors.h"
#include "ardour_ui.h"
-#include "prompter.h"
#include "utils.h"
#include "route_sorter.h"
#include "actions.h"
favorite_plugins_display.show();
MixerStrip::CatchDeletion.connect (*this, invalidator (*this), boost::bind (&Mixer_UI::remove_strip, this, _1), gui_context());
+ VCAMasterStrip::CatchDeletion.connect (*this, invalidator (*this), boost::bind (&Mixer_UI::remove_master, this, _1), gui_context());
/* handle escape */
row[stripable_columns.strip] = vms;
row[stripable_columns.stripable] = vca;
- vms->CatchDeletion.connect (*this, invalidator (*this), boost::bind (&Mixer_UI::remove_master, this, _1), gui_context());
+ vms->signal_button_release_event().connect (sigc::bind (sigc::mem_fun(*this, &Mixer_UI::vca_button_release_event), vms));
} else if ((route = boost::dynamic_pointer_cast<Route> (*s))) {
if (!_selection.axes.empty() && !PublicEditor::instance().track_selection_change_without_scroll ()) {
move_stripable_into_view ((*_selection.axes.begin())->stripable());
}
+
+ TreeModel::Children rows = track_model->children();
+ for (TreeModel::Children::const_iterator i = rows.begin(); i != rows.end(); ++i) {
+ AxisView* av = (*i)[stripable_columns.strip];
+ VCAMasterStrip* vms = dynamic_cast<VCAMasterStrip*> (av);
+ if (!vms) {
+ continue;
+ }
+ if (vms->vca() && vms->vca()->is_selected()) {
+ _selection.add (vms);
+ } else {
+ _selection.remove (vms);
+ }
+ }
}
redisplay_track_list ();
}
}
+ TreeModel::Children rows = track_model->children();
+ for (TreeModel::Children::const_iterator i = rows.begin(); i != rows.end(); ++i) {
+ AxisView* av = (*i)[stripable_columns.strip];
+ VCAMasterStrip* vms = dynamic_cast<VCAMasterStrip*> (av);
+ if (vms && vms->stripable () == s) {
+ return av;
+ }
+ }
+
return 0;
}
/* de-select others */
_selection.set (strip);
}
+ PublicEditor& pe = PublicEditor::instance();
+ TimeAxisView* tav = pe.time_axis_view_from_stripable (strip->stripable());
+ if (tav) {
+ pe.set_selected_mixer_strip (*tav);
+ }
} else {
if (Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) {
_selection.add (strip, true);
return true;
}
+bool
+Mixer_UI::vca_button_release_event (GdkEventButton *ev, VCAMasterStrip *strip)
+{
+ _selection.set (strip);
+ return true;
+}
+
void
Mixer_UI::set_session (Session* sess)
{
if (!pip->is_instrument ()) {
continue;
}
- ARDOUR_UI::instance()->session_add_midi_track ((RouteGroup*) 0, 1, _("MIDI"), Config->get_strict_io (), pip, ppp->_preset.valid ? &ppp->_preset : 0, PresentationInfo::max_order);
+ ARDOUR_UI::instance()->session_add_midi_route (true, (RouteGroup*) 0, 1, _("MIDI"), Config->get_strict_io (), pip, ppp->_preset.valid ? &ppp->_preset : 0, PresentationInfo::max_order);
ok = true;
}