mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-16 19:56:31 +01:00
make tracks visible again
git-svn-id: svn://localhost/ardour2/branches/3.0@3719 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
823f44e50a
commit
b0424889b3
11 changed files with 43 additions and 23 deletions
|
|
@ -92,15 +92,11 @@ AudioTimeAxisView::AudioTimeAxisView (PublicEditor& ed, Session& sess, boost::sh
|
||||||
mute_button->set_active (false);
|
mute_button->set_active (false);
|
||||||
solo_button->set_active (false);
|
solo_button->set_active (false);
|
||||||
|
|
||||||
if (is_audio_track())
|
if (is_audio_track()) {
|
||||||
controls_ebox.set_name ("AudioTimeAxisViewControlsBaseUnselected");
|
controls_ebox.set_name ("AudioTrackControlsBaseUnselected");
|
||||||
else // bus
|
} else { // bus
|
||||||
controls_ebox.set_name ("AudioBusControlsBaseUnselected");
|
controls_ebox.set_name ("AudioBusControlsBaseUnselected");
|
||||||
|
}
|
||||||
/* map current state of the route */
|
|
||||||
|
|
||||||
processors_changed ();
|
|
||||||
reset_processor_automation_curves ();
|
|
||||||
|
|
||||||
ensure_xml_node ();
|
ensure_xml_node ();
|
||||||
|
|
||||||
|
|
@ -108,6 +104,11 @@ AudioTimeAxisView::AudioTimeAxisView (PublicEditor& ed, Session& sess, boost::sh
|
||||||
|
|
||||||
_route->panner().Changed.connect (bind (mem_fun(*this, &AudioTimeAxisView::update_pans), false));
|
_route->panner().Changed.connect (bind (mem_fun(*this, &AudioTimeAxisView::update_pans), false));
|
||||||
|
|
||||||
|
/* map current state of the route */
|
||||||
|
|
||||||
|
processors_changed ();
|
||||||
|
reset_processor_automation_curves ();
|
||||||
|
update_pans (false);
|
||||||
update_control_names ();
|
update_control_names ();
|
||||||
|
|
||||||
if (is_audio_track()) {
|
if (is_audio_track()) {
|
||||||
|
|
@ -161,6 +162,7 @@ AudioTimeAxisView::hide ()
|
||||||
TimeAxisView::hide ();
|
TimeAxisView::hide ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
AudioTimeAxisView::append_extra_display_menu_items ()
|
AudioTimeAxisView::append_extra_display_menu_items ()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -376,12 +376,10 @@ void
|
||||||
AutomationTimeAxisView::set_height (uint32_t h)
|
AutomationTimeAxisView::set_height (uint32_t h)
|
||||||
{
|
{
|
||||||
bool changed = (height != (uint32_t) h) || first_call_to_set_height;
|
bool changed = (height != (uint32_t) h) || first_call_to_set_height;
|
||||||
|
|
||||||
if (first_call_to_set_height)
|
|
||||||
first_call_to_set_height = false;
|
|
||||||
bool changed_between_small_and_normal = ( (h == hSmall || h == hSmaller) ^ (height == hSmall || height == hSmaller) );
|
bool changed_between_small_and_normal = ( (h == hSmall || h == hSmaller) ^ (height == hSmall || height == hSmaller) );
|
||||||
|
|
||||||
TimeAxisView* state_parent = get_parent_with_state ();
|
TimeAxisView* state_parent = get_parent_with_state ();
|
||||||
|
|
||||||
assert(state_parent);
|
assert(state_parent);
|
||||||
XMLNode* xml_node = state_parent->get_automation_child_xml_node (_control->parameter());
|
XMLNode* xml_node = state_parent->get_automation_child_xml_node (_control->parameter());
|
||||||
|
|
||||||
|
|
@ -401,6 +399,7 @@ AutomationTimeAxisView::set_height (uint32_t h)
|
||||||
xml_node->add_property ("height", buf);
|
xml_node->add_property ("height", buf);
|
||||||
|
|
||||||
if (changed_between_small_and_normal || first_call_to_set_height) {
|
if (changed_between_small_and_normal || first_call_to_set_height) {
|
||||||
|
|
||||||
first_call_to_set_height = false;
|
first_call_to_set_height = false;
|
||||||
|
|
||||||
if (h >= hNormal) {
|
if (h >= hNormal) {
|
||||||
|
|
@ -912,9 +911,9 @@ void
|
||||||
AutomationTimeAxisView::update_extra_xml_shown (bool editor_shown)
|
AutomationTimeAxisView::update_extra_xml_shown (bool editor_shown)
|
||||||
{
|
{
|
||||||
XMLNode* xml_node = get_state_node();
|
XMLNode* xml_node = get_state_node();
|
||||||
// if (xml_node) {
|
if (xml_node) {
|
||||||
xml_node->add_property ("shown", editor_shown ? "yes" : "no");
|
xml_node->add_property ("shown", editor_shown ? "yes" : "no");
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
guint32
|
guint32
|
||||||
|
|
|
||||||
|
|
@ -71,8 +71,7 @@ class AutomationTimeAxisView : public TimeAxisView {
|
||||||
|
|
||||||
~AutomationTimeAxisView();
|
~AutomationTimeAxisView();
|
||||||
|
|
||||||
|
virtual void set_height (uint32_t);
|
||||||
void set_height (uint32_t);
|
|
||||||
void set_samples_per_unit (double);
|
void set_samples_per_unit (double);
|
||||||
std::string name() const { return _name; }
|
std::string name() const { return _name; }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ list<Gdk::Color> AxisView::used_colors;
|
||||||
AxisView::AxisView (ARDOUR::Session& sess) : _session(sess)
|
AxisView::AxisView (ARDOUR::Session& sess) : _session(sess)
|
||||||
{
|
{
|
||||||
_selected = false;
|
_selected = false;
|
||||||
_marked_for_display = true;
|
_marked_for_display = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
AxisView::~AxisView()
|
AxisView::~AxisView()
|
||||||
|
|
|
||||||
|
|
@ -744,6 +744,10 @@ Editor::Editor ()
|
||||||
vpacker.pack_end (status_bar_hpacker, false, false);
|
vpacker.pack_end (status_bar_hpacker, false, false);
|
||||||
vpacker.pack_end (global_hpacker, true, true);
|
vpacker.pack_end (global_hpacker, true, true);
|
||||||
|
|
||||||
|
edit_controls_vbox.show ();
|
||||||
|
controls_layout.show ();
|
||||||
|
the_notebook.show_all ();
|
||||||
|
|
||||||
/* register actions now so that set_state() can find them and set toggles/checks etc */
|
/* register actions now so that set_state() can find them and set toggles/checks etc */
|
||||||
|
|
||||||
register_actions ();
|
register_actions ();
|
||||||
|
|
|
||||||
|
|
@ -102,12 +102,14 @@ Editor::handle_new_route (Session::RouteList& routes)
|
||||||
#else
|
#else
|
||||||
row = *(route_display_model->append ());
|
row = *(route_display_model->append ());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
cerr << route->name() << " marked for display ? " << tv->marked_for_display() << endl;
|
||||||
|
|
||||||
row[route_display_columns.text] = route->name();
|
row[route_display_columns.text] = route->name();
|
||||||
row[route_display_columns.visible] = tv->marked_for_display();
|
row[route_display_columns.visible] = tv->marked_for_display();
|
||||||
row[route_display_columns.tv] = tv;
|
row[route_display_columns.tv] = tv;
|
||||||
row[route_display_columns.route] = route;
|
row[route_display_columns.route] = route;
|
||||||
|
|
||||||
track_views.push_back (tv);
|
track_views.push_back (tv);
|
||||||
|
|
||||||
ignore_route_list_reorder = true;
|
ignore_route_list_reorder = true;
|
||||||
|
|
@ -233,6 +235,7 @@ Editor::update_route_visibility ()
|
||||||
for (i = rows.begin(); i != rows.end(); ++i) {
|
for (i = rows.begin(); i != rows.end(); ++i) {
|
||||||
TimeAxisView *tv = (*i)[route_display_columns.tv];
|
TimeAxisView *tv = (*i)[route_display_columns.tv];
|
||||||
(*i)[route_display_columns.visible] = tv->marked_for_display ();
|
(*i)[route_display_columns.visible] = tv->marked_for_display ();
|
||||||
|
cerr << "marked " << tv->name() << " for display = " << tv->marked_for_display() << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
no_route_list_redisplay = false;
|
no_route_list_redisplay = false;
|
||||||
|
|
@ -319,6 +322,8 @@ Editor::redisplay_route_list ()
|
||||||
uint32_t position;
|
uint32_t position;
|
||||||
uint32_t order;
|
uint32_t order;
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
|
cerr << "RRL, nrld = " << no_route_list_redisplay << " with " << rows.size() << endl;
|
||||||
|
|
||||||
if (no_route_list_redisplay) {
|
if (no_route_list_redisplay) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -347,9 +352,12 @@ Editor::redisplay_route_list ()
|
||||||
|
|
||||||
bool visible = (*i)[route_display_columns.visible];
|
bool visible = (*i)[route_display_columns.visible];
|
||||||
|
|
||||||
|
cerr << "\tvisible = " << visible << endl;
|
||||||
|
|
||||||
if (visible) {
|
if (visible) {
|
||||||
tv->set_marked_for_display (true);
|
tv->set_marked_for_display (true);
|
||||||
position += tv->show_at (position, n, &edit_controls_vbox);
|
position += tv->show_at (position, n, &edit_controls_vbox);
|
||||||
|
cerr << "packed tv for " << tv->name() << " @ " << position << endl;
|
||||||
} else {
|
} else {
|
||||||
tv->hide ();
|
tv->hide ();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -107,7 +107,9 @@ MixerStrip::MixerStrip (Mixer_UI& mx, Session& sess, boost::shared_ptr<Route> rt
|
||||||
input_selector = 0;
|
input_selector = 0;
|
||||||
output_selector = 0;
|
output_selector = 0;
|
||||||
group_menu = 0;
|
group_menu = 0;
|
||||||
_marked_for_display = false;
|
if (!_route->is_hidden()) {
|
||||||
|
_marked_for_display = true;
|
||||||
|
}
|
||||||
route_ops_menu = 0;
|
route_ops_menu = 0;
|
||||||
ignore_comment_edit = false;
|
ignore_comment_edit = false;
|
||||||
ignore_toggle = false;
|
ignore_toggle = false;
|
||||||
|
|
|
||||||
|
|
@ -117,6 +117,11 @@ RouteTimeAxisView::RouteTimeAxisView (PublicEditor& ed, Session& sess, boost::sh
|
||||||
playlist_action_menu = 0;
|
playlist_action_menu = 0;
|
||||||
automation_action_menu = 0;
|
automation_action_menu = 0;
|
||||||
_view = 0;
|
_view = 0;
|
||||||
|
|
||||||
|
if (!_route->is_hidden()) {
|
||||||
|
_marked_for_display = true;
|
||||||
|
}
|
||||||
|
|
||||||
timestretch_rect = 0;
|
timestretch_rect = 0;
|
||||||
no_redraw = false;
|
no_redraw = false;
|
||||||
destructive_track_mode_item = 0;
|
destructive_track_mode_item = 0;
|
||||||
|
|
@ -1795,6 +1800,7 @@ RouteTimeAxisView::add_automation_child(Parameter param, boost::shared_ptr<Autom
|
||||||
using namespace Menu_Helpers;
|
using namespace Menu_Helpers;
|
||||||
|
|
||||||
XMLProperty* prop;
|
XMLProperty* prop;
|
||||||
|
XMLNode* node;
|
||||||
|
|
||||||
add_child (track);
|
add_child (track);
|
||||||
|
|
||||||
|
|
@ -1802,8 +1808,6 @@ RouteTimeAxisView::add_automation_child(Parameter param, boost::shared_ptr<Autom
|
||||||
|
|
||||||
bool hideit = (!show);
|
bool hideit = (!show);
|
||||||
|
|
||||||
XMLNode* node;
|
|
||||||
|
|
||||||
if ((node = track->get_state_node()) != 0) {
|
if ((node = track->get_state_node()) != 0) {
|
||||||
if ((prop = node->property ("shown")) != 0) {
|
if ((prop = node->property ("shown")) != 0) {
|
||||||
if (prop->value() == "yes") {
|
if (prop->value() == "yes") {
|
||||||
|
|
@ -1811,6 +1815,8 @@ RouteTimeAxisView::add_automation_child(Parameter param, boost::shared_ptr<Autom
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cerr << "with show = " << show << " Adding automation child for " << _route->name() << " hideit = " << hideit << " prop = " << prop << endl;
|
||||||
|
|
||||||
_automation_tracks.insert(std::make_pair(param, new RouteAutomationNode(param, NULL, track)));
|
_automation_tracks.insert(std::make_pair(param, new RouteAutomationNode(param, NULL, track)));
|
||||||
|
|
||||||
|
|
@ -1819,6 +1825,7 @@ RouteTimeAxisView::add_automation_child(Parameter param, boost::shared_ptr<Autom
|
||||||
} else {
|
} else {
|
||||||
_show_automation.insert (param);
|
_show_automation.insert (param);
|
||||||
|
|
||||||
|
|
||||||
if (!no_redraw) {
|
if (!no_redraw) {
|
||||||
_route->gui_changed ("visible_tracks", (void *) 0); /* EMIT_SIGNAL */
|
_route->gui_changed ("visible_tracks", (void *) 0); /* EMIT_SIGNAL */
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,6 @@ TimeAxisView::TimeAxisView (ARDOUR::Session& sess, PublicEditor& ed, TimeAxisVie
|
||||||
control_parent = 0;
|
control_parent = 0;
|
||||||
display_menu = 0;
|
display_menu = 0;
|
||||||
size_menu = 0;
|
size_menu = 0;
|
||||||
_marked_for_display = false;
|
|
||||||
_hidden = false;
|
_hidden = false;
|
||||||
in_destructor = false;
|
in_destructor = false;
|
||||||
height = 0;
|
height = 0;
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,6 @@ VisualTimeAxis::VisualTimeAxis(const string & name, PublicEditor& ed, ARDOUR::Se
|
||||||
{
|
{
|
||||||
time_axis_name = name ;
|
time_axis_name = name ;
|
||||||
_color = unique_random_color() ;
|
_color = unique_random_color() ;
|
||||||
_marked_for_display = true;
|
|
||||||
|
|
||||||
name_entry.signal_activate().connect(mem_fun(*this, &VisualTimeAxis::name_entry_changed)) ;
|
name_entry.signal_activate().connect(mem_fun(*this, &VisualTimeAxis::name_entry_changed)) ;
|
||||||
name_entry.signal_button_press_event().connect(mem_fun(*this, &VisualTimeAxis::name_entry_button_press_handler)) ;
|
name_entry.signal_button_press_event().connect(mem_fun(*this, &VisualTimeAxis::name_entry_button_press_handler)) ;
|
||||||
|
|
|
||||||
|
|
@ -201,7 +201,8 @@ Automatable::describe_parameter (Parameter param)
|
||||||
if (param == Parameter(GainAutomation)) {
|
if (param == Parameter(GainAutomation)) {
|
||||||
return _("Fader");
|
return _("Fader");
|
||||||
} else if (param.type() == PanAutomation) {
|
} else if (param.type() == PanAutomation) {
|
||||||
return (string_compose(_("Pan %1"), param.id()));
|
/* ID's are zero-based, present them as 1-based */
|
||||||
|
return (string_compose(_("Pan %1"), param.id() + 1));
|
||||||
} else if (param.type() == MidiCCAutomation) {
|
} else if (param.type() == MidiCCAutomation) {
|
||||||
return string_compose("CC %1 (%2) [%3]",
|
return string_compose("CC %1 (%2) [%3]",
|
||||||
param.id(), midi_name(param.id()), int(param.channel()) + 1);
|
param.id(), midi_name(param.id()), int(param.channel()) + 1);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue