#include "gtkmm2ext/cell_renderer_pixbuf_toggle.h"
#include "gtkmm2ext/treeutils.h"
+#include "widgets/tooltips.h"
+
#include "actions.h"
#include "ardour_ui.h"
#include "audio_time_axis.h"
#include "mixer_strip.h"
#include "plugin_setup_dialog.h"
#include "route_sorter.h"
-#include "tooltips.h"
#include "vca_time_axis.h"
#include "utils.h"
using namespace std;
using namespace ARDOUR;
+using namespace ArdourWidgets;
using namespace ARDOUR_UI_UTILS;
using namespace PBD;
using namespace Gtk;
TreeViewColumn* solo_isolate_state_column = manage (new TreeViewColumn("SI", *solo_iso_renderer));
solo_isolate_state_column->add_attribute(solo_iso_renderer->property_state(), _columns.solo_isolate_state);
- solo_isolate_state_column->add_attribute(solo_iso_renderer->property_visible(), _columns.solo_visible);
+ solo_isolate_state_column->add_attribute(solo_iso_renderer->property_visible(), _columns.solo_lock_iso_visible);
solo_isolate_state_column->set_sizing(TREE_VIEW_COLUMN_FIXED);
solo_isolate_state_column->set_alignment(ALIGN_CENTER);
solo_isolate_state_column->set_expand(false);
TreeViewColumn* solo_safe_state_column = manage (new TreeViewColumn(_("SS"), *solo_safe_renderer));
solo_safe_state_column->add_attribute(solo_safe_renderer->property_state(), _columns.solo_safe_state);
- solo_safe_state_column->add_attribute(solo_safe_renderer->property_visible(), _columns.solo_visible);
+ solo_safe_state_column->add_attribute(solo_safe_renderer->property_visible(), _columns.solo_lock_iso_visible);
solo_safe_state_column->set_sizing(TREE_VIEW_COLUMN_FIXED);
solo_safe_state_column->set_alignment(ALIGN_CENTER);
solo_safe_state_column->set_expand(false);
active_col->set_sizing (TREE_VIEW_COLUMN_FIXED);
active_col->set_fixed_width (30);
active_col->set_alignment (ALIGN_CENTER);
+ active_col->add_attribute (active_cell->property_visible(), _columns.no_vca);
_model->signal_row_deleted().connect (sigc::mem_fun (*this, &EditorRoutes::row_deleted));
_model->signal_rows_reordered().connect (sigc::mem_fun (*this, &EditorRoutes::reordered));
Gtk::TreeModel::Row row = *_model->get_iter (Gtk::TreeModel::Path (path_string));
TimeAxisView* tv = row[_columns.tv];
- RouteTimeAxisView *rtv = dynamic_cast<RouteTimeAxisView*> (tv);
+ StripableTimeAxisView* stv = dynamic_cast<StripableTimeAxisView*> (tv);
- if (!rtv) {
+ if (!stv || !stv->stripable()) {
return;
}
- boost::shared_ptr<AutomationControl> ac = rtv->route()->rec_enable_control();
+ boost::shared_ptr<AutomationControl> ac = stv->stripable()->rec_enable_control();
if (ac) {
ac->set_value (!ac->get_value(), Controllable::UseGroup);
{
Gtk::TreeModel::Row row = *_model->get_iter (Gtk::TreeModel::Path (path_string));
TimeAxisView* tv = row[_columns.tv];
- RouteTimeAxisView *rtv = dynamic_cast<RouteTimeAxisView*> (tv);
+ StripableTimeAxisView* stv = dynamic_cast<StripableTimeAxisView*> (tv);
- if (!rtv) {
+ if (!stv || !stv->stripable()) {
return;
}
- boost::shared_ptr<AutomationControl> ac (rtv->route()->rec_safe_control());
+ boost::shared_ptr<AutomationControl> ac (stv->stripable()->rec_safe_control());
if (ac) {
ac->set_value (!ac->get_value(), Controllable::UseGroup);
Gtk::TreeModel::Row row = *_model->get_iter (Gtk::TreeModel::Path (path_string));
TimeAxisView *tv = row[_columns.tv];
- RouteTimeAxisView *rtv = dynamic_cast<RouteTimeAxisView*> (tv);
+ StripableTimeAxisView* stv = dynamic_cast<StripableTimeAxisView*> (tv);
- if (!rtv) {
+ if (!stv || !stv->stripable()) {
return;
}
- boost::shared_ptr<AutomationControl> ac (rtv->route()->mute_control());
+ boost::shared_ptr<AutomationControl> ac (stv->stripable()->mute_control());
if (ac) {
ac->set_value (!ac->get_value(), Controllable::UseGroup);
Gtk::TreeModel::Row row = *_model->get_iter (Gtk::TreeModel::Path (path_string));
TimeAxisView *tv = row[_columns.tv];
- RouteTimeAxisView* rtv = dynamic_cast<RouteTimeAxisView*> (tv);
+ StripableTimeAxisView* stv = dynamic_cast<StripableTimeAxisView*> (tv);
- if (!rtv) {
+ if (!stv || !stv->stripable()) {
return;
}
- boost::shared_ptr<AutomationControl> ac (rtv->route()->solo_control());
+ boost::shared_ptr<AutomationControl> ac (stv->stripable()->solo_control());
if (ac) {
ac->set_value (!ac->get_value(), Controllable::UseGroup);
Gtk::TreeModel::Row row = *_model->get_iter (Gtk::TreeModel::Path (path_string));
TimeAxisView *tv = row[_columns.tv];
- RouteTimeAxisView* rtv = dynamic_cast<RouteTimeAxisView*> (tv);
+ StripableTimeAxisView* stv = dynamic_cast<StripableTimeAxisView*> (tv);
- if (!rtv) {
+ if (!stv || !stv->stripable()) {
return;
}
- boost::shared_ptr<AutomationControl> ac (rtv->route()->solo_isolate_control());
+ boost::shared_ptr<AutomationControl> ac (stv->stripable()->solo_isolate_control());
if (ac) {
ac->set_value (!ac->get_value(), Controllable::UseGroup);
Gtk::TreeModel::Row row = *_model->get_iter (Gtk::TreeModel::Path (path_string));
TimeAxisView *tv = row[_columns.tv];
- RouteTimeAxisView* rtv = dynamic_cast<RouteTimeAxisView*> (tv);
+ StripableTimeAxisView* stv = dynamic_cast<StripableTimeAxisView*> (tv);
- if (!rtv) {
+ if (!stv || !stv->stripable()) {
return;
}
- boost::shared_ptr<AutomationControl> ac (rtv->route()->solo_safe_control());
+ boost::shared_ptr<AutomationControl> ac (stv->stripable()->solo_safe_control());
if (ac) {
ac->set_value (!ac->get_value(), Controllable::UseGroup);
items.push_back (MenuElem (_("Hide All"), sigc::mem_fun (*this, &EditorRoutes::hide_all_routes)));
items.push_back (MenuElem (_("Show All Audio Tracks"), sigc::mem_fun (*this, &EditorRoutes::show_all_audiotracks)));
items.push_back (MenuElem (_("Hide All Audio Tracks"), sigc::mem_fun (*this, &EditorRoutes::hide_all_audiotracks)));
- items.push_back (MenuElem (_("Show All Audio Busses"), sigc::mem_fun (*this, &EditorRoutes::show_all_audiobus)));
- items.push_back (MenuElem (_("Hide All Audio Busses"), sigc::mem_fun (*this, &EditorRoutes::hide_all_audiobus)));
items.push_back (MenuElem (_("Show All Midi Tracks"), sigc::mem_fun (*this, &EditorRoutes::show_all_miditracks)));
items.push_back (MenuElem (_("Hide All Midi Tracks"), sigc::mem_fun (*this, &EditorRoutes::hide_all_miditracks)));
+ items.push_back (MenuElem (_("Show All Busses"), sigc::mem_fun (*this, &EditorRoutes::show_all_audiobus)));
+ items.push_back (MenuElem (_("Hide All Busses"), sigc::mem_fun (*this, &EditorRoutes::hide_all_audiobus)));
items.push_back (MenuElem (_("Only Show Tracks with Regions Under Playhead"), sigc::mem_fun (*this, &EditorRoutes::show_tracks_with_regions_at_playhead)));
}
row[_columns.is_track] = false;
row[_columns.is_input_active] = false;
row[_columns.is_midi] = false;
+ row[_columns.no_vca] = false;
} else if (rtav) {
midi_trk= boost::dynamic_pointer_cast<MidiTrack> (stripable);
row[_columns.is_track] = (boost::dynamic_pointer_cast<Track> (stripable) != 0);
+ row[_columns.no_vca] = true;
if (midi_trk) {
row[_columns.is_input_active] = midi_trk->input_active ();
row[_columns.stripable] = stripable;
row[_columns.mute_state] = RouteUI::mute_active_state (_session, stripable);
row[_columns.solo_state] = RouteUI::solo_active_state (stripable);
- row[_columns.solo_visible] = true;
+ row[_columns.solo_visible] = !stripable->is_master ();
+ row[_columns.solo_lock_iso_visible] = row[_columns.solo_visible] && row[_columns.no_vca];
row[_columns.solo_isolate_state] = RouteUI::solo_isolate_active_state (stripable);
row[_columns.solo_safe_state] = RouteUI::solo_safe_active_state (stripable);
row[_columns.name_editable] = true;
(*i)[_columns.visible] = tv->marked_for_display ();
}
- /* force route order keys catch up with visibility changes
- */
+ /* force route order keys catch up with visibility changes */
sync_presentation_info_from_treeview ();
}
DEBUG_TRACE (DEBUG::OrderKeys, "editor sync presentation info from treeview\n");
- TreeModel::Children::iterator ri;
bool change = false;
PresentationInfo::order_t order = 0;
PresentationInfo::ChangeSuspender cs;
- for (ri = rows.begin(); ri != rows.end(); ++ri) {
+ for (TreeModel::Children::iterator ri = rows.begin(); ri != rows.end(); ++ri) {
boost::shared_ptr<Stripable> stripable = (*ri)[_columns.stripable];
bool visible = (*ri)[_columns.visible];
#ifndef NDEBUG // these should not exist in the treeview
+ assert (stripable);
if (stripable->is_monitor() || stripable->is_auditioner()) {
assert (0);
continue;
TreeModel::Children rows = _model->children();
- if (what_changed.contains (hidden_or_order)) {
+ bool changed = false;
+ if (what_changed.contains (hidden_or_order)) {
vector<int> neworder;
uint32_t old_order = 0;
- bool changed = false;
if (rows.empty()) {
return;
}
}
- if (what_changed.contains (Properties::selected)) {
-
+ if (changed || what_changed.contains (Properties::selected)) {
/* by the time this is invoked, the GUI Selection model has
* already updated itself.
*/
-
PBD::Unwinder<bool> uw (_ignore_selection_change, true);
- /* set the treeview model selection state */
+ /* set the treeview model selection state */
for (TreeModel::Children::iterator ri = rows.begin(); ri != rows.end(); ++ri) {
boost::shared_ptr<Stripable> stripable = (*ri)[_columns.stripable];
if (stripable && stripable->is_selected()) {
TreeModel::iterator iter = model->get_iter (path);
if (iter) {
boost::shared_ptr<Stripable> stripable = (*iter)[_columns.stripable];
- if (boost::dynamic_pointer_cast<VCA> (stripable)) {
- return false;
- }
}
return true;
{
if (!_session) {
- _model->clear ();
+ clear ();
return;
}
StripableList s;
- RouteList r (*_session->get_routes());
- for (RouteList::iterator ri = r.begin(); ri != r.end(); ++ri) {
- s.push_back (*ri);
- }
-
- VCAList v (_session->vca_manager().vcas());
- for (VCAList::iterator vi = v.begin(); vi != v.end(); ++vi) {
- s.push_back (*vi);
- }
-
+ _session->get_stripables (s);
_editor->add_stripables (s);
sync_treeview_from_presentation_info (Properties::order);
void
EditorRoutes::show_tracks_with_regions_at_playhead ()
{
- boost::shared_ptr<RouteList> const r = _session->get_routes_with_regions_at (_session->transport_frame ());
+ boost::shared_ptr<RouteList> const r = _session->get_routes_with_regions_at (_session->transport_sample ());
set<TimeAxisView*> show;
for (RouteList::const_iterator i = r->begin(); i != r->end(); ++i) {