add context menu to hide/show Midi-tracks - fixes #6430
This commit is contained in:
parent
62d0384b5a
commit
ad9f76a8c5
@ -945,7 +945,7 @@ Mixer_UI::set_all_strips_visibility (bool yn)
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Mixer_UI::set_all_audio_visibility (int tracks, bool yn)
|
Mixer_UI::set_all_audio_midi_visibility (int tracks, bool yn)
|
||||||
{
|
{
|
||||||
TreeModel::Children rows = track_model->children();
|
TreeModel::Children rows = track_model->children();
|
||||||
TreeModel::Children::iterator i;
|
TreeModel::Children::iterator i;
|
||||||
@ -966,6 +966,7 @@ Mixer_UI::set_all_audio_visibility (int tracks, bool yn)
|
|||||||
}
|
}
|
||||||
|
|
||||||
boost::shared_ptr<AudioTrack> at = strip->audio_track();
|
boost::shared_ptr<AudioTrack> at = strip->audio_track();
|
||||||
|
boost::shared_ptr<MidiTrack> mt = strip->midi_track();
|
||||||
|
|
||||||
switch (tracks) {
|
switch (tracks) {
|
||||||
case 0:
|
case 0:
|
||||||
@ -979,7 +980,13 @@ Mixer_UI::set_all_audio_visibility (int tracks, bool yn)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
if (!at) { /* bus */
|
if (!at && !mt) { /* bus */
|
||||||
|
(*i)[track_columns.visible] = yn;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 3:
|
||||||
|
if (mt) { /* midi-track */
|
||||||
(*i)[track_columns.visible] = yn;
|
(*i)[track_columns.visible] = yn;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -1005,25 +1012,37 @@ Mixer_UI::show_all_routes ()
|
|||||||
void
|
void
|
||||||
Mixer_UI::show_all_audiobus ()
|
Mixer_UI::show_all_audiobus ()
|
||||||
{
|
{
|
||||||
set_all_audio_visibility (2, true);
|
set_all_audio_midi_visibility (2, true);
|
||||||
}
|
}
|
||||||
void
|
void
|
||||||
Mixer_UI::hide_all_audiobus ()
|
Mixer_UI::hide_all_audiobus ()
|
||||||
{
|
{
|
||||||
set_all_audio_visibility (2, false);
|
set_all_audio_midi_visibility (2, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Mixer_UI::show_all_audiotracks()
|
Mixer_UI::show_all_audiotracks()
|
||||||
{
|
{
|
||||||
set_all_audio_visibility (1, true);
|
set_all_audio_midi_visibility (1, true);
|
||||||
}
|
}
|
||||||
void
|
void
|
||||||
Mixer_UI::hide_all_audiotracks ()
|
Mixer_UI::hide_all_audiotracks ()
|
||||||
{
|
{
|
||||||
set_all_audio_visibility (1, false);
|
set_all_audio_midi_visibility (1, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
Mixer_UI::show_all_miditracks()
|
||||||
|
{
|
||||||
|
set_all_audio_midi_visibility (3, true);
|
||||||
|
}
|
||||||
|
void
|
||||||
|
Mixer_UI::hide_all_miditracks ()
|
||||||
|
{
|
||||||
|
set_all_audio_midi_visibility (3, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Mixer_UI::track_list_reorder (const TreeModel::Path&, const TreeModel::iterator&, int* /*new_order*/)
|
Mixer_UI::track_list_reorder (const TreeModel::Path&, const TreeModel::iterator&, int* /*new_order*/)
|
||||||
{
|
{
|
||||||
@ -1196,6 +1215,8 @@ Mixer_UI::build_track_menu ()
|
|||||||
items.push_back (MenuElem (_("Hide All Audio Tracks"), sigc::mem_fun(*this, &Mixer_UI::hide_all_audiotracks)));
|
items.push_back (MenuElem (_("Hide All Audio Tracks"), sigc::mem_fun(*this, &Mixer_UI::hide_all_audiotracks)));
|
||||||
items.push_back (MenuElem (_("Show All Audio Busses"), sigc::mem_fun(*this, &Mixer_UI::show_all_audiobus)));
|
items.push_back (MenuElem (_("Show All Audio Busses"), sigc::mem_fun(*this, &Mixer_UI::show_all_audiobus)));
|
||||||
items.push_back (MenuElem (_("Hide All Audio Busses"), sigc::mem_fun(*this, &Mixer_UI::hide_all_audiobus)));
|
items.push_back (MenuElem (_("Hide All Audio Busses"), sigc::mem_fun(*this, &Mixer_UI::hide_all_audiobus)));
|
||||||
|
items.push_back (MenuElem (_("Show All Midi Tracks"), sigc::mem_fun (*this, &Mixer_UI::show_all_miditracks)));
|
||||||
|
items.push_back (MenuElem (_("Hide All Midi Tracks"), sigc::mem_fun (*this, &Mixer_UI::hide_all_miditracks)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -179,7 +179,7 @@ class Mixer_UI : public Gtk::Window, public PBD::ScopedConnectionList, public AR
|
|||||||
void show_track_list_menu ();
|
void show_track_list_menu ();
|
||||||
|
|
||||||
void set_all_strips_visibility (bool yn);
|
void set_all_strips_visibility (bool yn);
|
||||||
void set_all_audio_visibility (int tracks, bool yn);
|
void set_all_audio_midi_visibility (int, bool);
|
||||||
void track_visibility_changed (std::string const & path);
|
void track_visibility_changed (std::string const & path);
|
||||||
void update_track_visibility ();
|
void update_track_visibility ();
|
||||||
|
|
||||||
@ -189,6 +189,8 @@ class Mixer_UI : public Gtk::Window, public PBD::ScopedConnectionList, public AR
|
|||||||
void hide_all_audiobus ();
|
void hide_all_audiobus ();
|
||||||
void show_all_audiotracks();
|
void show_all_audiotracks();
|
||||||
void hide_all_audiotracks ();
|
void hide_all_audiotracks ();
|
||||||
|
void show_all_miditracks();
|
||||||
|
void hide_all_miditracks ();
|
||||||
|
|
||||||
bool in_group_row_change;
|
bool in_group_row_change;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user