summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_mixer.cc
diff options
context:
space:
mode:
authorBen Loftis <ben@glw.com>2010-04-26 21:47:58 +0000
committerBen Loftis <ben@glw.com>2010-04-26 21:47:58 +0000
commit507f22c7cda1eac54cd2952fd50f188e722bf6eb (patch)
treed5fa4c346815b82f8415eeff1a8505f4333ac16f /gtk2_ardour/editor_mixer.cc
parented4970a20308b4a03bb0a96f8c6580a84312fb79 (diff)
change automation track selection model slightly so that auto tracks are highlighted as expected. only show range boxes when the automation will actually get edited. clicking an automation track should show the editor-mixer for the parent track
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@6997 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_mixer.cc')
-rw-r--r--gtk2_ardour/editor_mixer.cc35
1 files changed, 17 insertions, 18 deletions
diff --git a/gtk2_ardour/editor_mixer.cc b/gtk2_ardour/editor_mixer.cc
index 6d2a882091..d6fa49a132 100644
--- a/gtk2_ardour/editor_mixer.cc
+++ b/gtk2_ardour/editor_mixer.cc
@@ -30,6 +30,7 @@
#include "ardour_ui.h"
#include "selection.h"
#include "audio_time_axis.h"
+#include "automation_time_axis.h"
#include "actions.h"
#include "i18n.h"
@@ -162,13 +163,11 @@ Editor::create_editor_mixer ()
void
Editor::set_selected_mixer_strip (TimeAxisView& view)
{
- AudioTimeAxisView* at;
bool show = false;
bool created;
- if (!session || (at = dynamic_cast<AudioTimeAxisView*>(&view)) == 0) {
+ if (!session)
return;
- }
Glib::RefPtr<Gtk::Action> act = ActionManager::get_action (X_("Editor"), X_("show-editor-mixer"));
if (act) {
@@ -186,9 +185,21 @@ Editor::set_selected_mixer_strip (TimeAxisView& view)
created = false;
}
- /* might be nothing to do */
+ //if this is an automation track then we should show the parent
+ boost::shared_ptr<ARDOUR::Route> route;
+ AutomationTimeAxisView *auto_tav;
+ if ( (auto_tav = dynamic_cast<AutomationTimeAxisView*>(&view)) == 0 ) {
+ AudioTimeAxisView* at = dynamic_cast<AudioTimeAxisView*>(&view);
+ if (at != NULL)
+ route = at->route();
+ } else {
+ AudioTimeAxisView *parent = dynamic_cast<AudioTimeAxisView*>( view.get_parent() );
+ if (parent != NULL) {
+ route = parent->route();
+ }
+ }
- if (current_mixer_strip->route() == at->route()) {
+ if (current_mixer_strip->route() == route) {
return;
}
@@ -196,7 +207,7 @@ Editor::set_selected_mixer_strip (TimeAxisView& view)
show = true;
}
- current_mixer_strip->set_route (at->route());
+ current_mixer_strip->set_route (route);
if (created) {
current_mixer_strip->set_width (editor_mixer_strip_width, (void*) this);
@@ -315,18 +326,6 @@ Editor::current_mixer_strip_removed ()
void
Editor::current_mixer_strip_hidden ()
{
- for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {
-
- AudioTimeAxisView* tmp;
-
- if ((tmp = dynamic_cast<AudioTimeAxisView*>(*i)) != 0) {
- if (tmp->route() == current_mixer_strip->route()) {
- (*i)->set_selected (false);
- break;
- }
- }
- }
-
Glib::RefPtr<Gtk::Action> act = ActionManager::get_action (X_("Editor"), X_("show-editor-mixer"));
if (act) {
Glib::RefPtr<Gtk::ToggleAction> tact = Glib::RefPtr<Gtk::ToggleAction>::cast_dynamic(act);