Initial work on getting MixerStrip representations for MixerSnapshots

This commit is contained in:
Nikolaus Gullotta 2019-09-05 15:40:30 -05:00 committed by Nikolaus Gullotta
parent 3160904a5e
commit 24ff335b3a
No known key found for this signature in database
GPG key ID: 565F60578092AA31
2 changed files with 18 additions and 0 deletions

View file

@ -23,11 +23,14 @@
#include <gtkmm/stock.h>
#include "mixer_snapshot_substitution_dialog.h"
#include "mixer_strip.h"
#include "mixer_ui.h"
#include "ardour/mixer_snapshot.h"
#include "ardour/utils.h"
#include "pbd/i18n.h"
#include "pbd/stateful.h"
using namespace ARDOUR;
using namespace Gtk;
@ -78,12 +81,26 @@ MixerSnapshotSubstitutionDialog::MixerSnapshotSubstitutionDialog(MixerSnapshot*
table->attach(*selection_combo, 1, 2, n, n+1);
n++;
vector<MixerSnapshot::State> routes = _snapshot->get_routes();
for(vector<MixerSnapshot::State>::iterator i = routes.begin(); i != routes.end(); i++) {
string name = (*i).name;
boost::shared_ptr<Route> new_route (new Route (*_snapshot->get_session(), name));
new_route->init();
//this is too volatile right now but will need to be resolved
// new_route->set_state((*i).node, Stateful::loading_state_version);
MixerStrip* strip = new MixerStrip(*Mixer_UI::instance(), _snapshot->get_session(), new_route, false);
route_packer.pack_start(*strip);
}
add_button (Stock::CANCEL, RESPONSE_CANCEL);
add_button (Stock::APPLY, RESPONSE_ACCEPT);
set_default_response(RESPONSE_ACCEPT);
get_vbox()->pack_start(*table, true, true);
get_vbox()->pack_start(route_packer, false, true);
}
void MixerSnapshotSubstitutionDialog::fill_combo_box(ComboBoxText* box, const string route_name)

View file

@ -50,6 +50,7 @@ private:
std::vector<route_combo> substitutions;
ARDOUR::MixerSnapshot* _snapshot;
Gtk::HBox route_packer;
};
#endif /* __ardour_mixer_snapshot_substitution_dialog_h__ */