2005-09-25 14:42:24 -04:00
|
|
|
/*
|
|
|
|
Copyright (C) 2000 Paul Davis
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
|
|
|
|
$Id$
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <algorithm>
|
|
|
|
#include <cstdlib>
|
|
|
|
#include <cmath>
|
|
|
|
|
|
|
|
#include "editor.h"
|
|
|
|
#include "ardour_ui.h"
|
|
|
|
#include "audio_time_axis.h"
|
|
|
|
#include "mixer_strip.h"
|
|
|
|
#include "gui_thread.h"
|
|
|
|
|
|
|
|
#include <ardour/route.h>
|
|
|
|
|
|
|
|
#include "i18n.h"
|
|
|
|
|
2005-09-25 16:33:00 -04:00
|
|
|
using namespace sigc;
|
2005-09-25 14:42:24 -04:00
|
|
|
using namespace ARDOUR;
|
|
|
|
using namespace Gtk;
|
|
|
|
|
|
|
|
void
|
|
|
|
Editor::handle_new_route_p (Route* route)
|
|
|
|
{
|
2005-09-25 17:19:23 -04:00
|
|
|
ENSURE_GUI_THREAD(bind (mem_fun(*this, &Editor::handle_new_route_p), route));
|
2005-09-25 14:42:24 -04:00
|
|
|
handle_new_route (*route);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
Editor::handle_new_route (Route& route)
|
|
|
|
{
|
|
|
|
TimeAxisView *tv;
|
|
|
|
AudioTimeAxisView *atv;
|
2005-10-26 14:12:00 -04:00
|
|
|
TreeModel::Row row = *(route_display_model->append());
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
if (route.hidden()) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2005-11-23 12:21:12 -05:00
|
|
|
tv = new AudioTimeAxisView (*this, *session, route, track_canvas);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
track_views.push_back (tv);
|
|
|
|
|
2005-10-26 14:12:00 -04:00
|
|
|
row[route_display_columns.text] = route.name();
|
|
|
|
row[route_display_columns.tv] = tv;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
ignore_route_list_reorder = true;
|
2005-10-26 14:12:00 -04:00
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
if (tv->marked_for_display()) {
|
2005-10-26 14:12:00 -04:00
|
|
|
route_list.get_selection()->select (row);
|
2005-09-25 14:42:24 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
if ((atv = dynamic_cast<AudioTimeAxisView*> (tv)) != 0) {
|
|
|
|
/* added a new fresh one at the end */
|
|
|
|
if (atv->route().order_key(N_("editor")) == -1) {
|
2005-10-26 14:12:00 -04:00
|
|
|
atv->route().set_order_key (N_("editor"), route_display_model->children().size()-1);
|
2005-09-25 14:42:24 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ignore_route_list_reorder = false;
|
|
|
|
|
2005-09-25 17:19:23 -04:00
|
|
|
route.gui_changed.connect (mem_fun(*this, &Editor::handle_gui_changes));
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2005-09-25 17:19:23 -04:00
|
|
|
tv->GoingAway.connect (bind (mem_fun(*this, &Editor::remove_route), tv));
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
editor_mixer_button.set_sensitive(true);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2005-12-22 07:23:54 -05:00
|
|
|
Editor::handle_gui_changes (const string & what, void *src)
|
2005-09-25 14:42:24 -04:00
|
|
|
{
|
2005-09-25 17:19:23 -04:00
|
|
|
ENSURE_GUI_THREAD(bind (mem_fun(*this, &Editor::handle_gui_changes), what, src));
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
if (what == "track_height") {
|
|
|
|
route_list_reordered ();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2005-10-26 14:12:00 -04:00
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
void
|
|
|
|
Editor::remove_route (TimeAxisView *tv)
|
|
|
|
{
|
2005-09-25 17:19:23 -04:00
|
|
|
ENSURE_GUI_THREAD(bind (mem_fun(*this, &Editor::remove_route), tv));
|
2005-10-26 14:12:00 -04:00
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
TrackViewList::iterator i;
|
2005-10-26 14:12:00 -04:00
|
|
|
TreeModel::Children rows = route_display_model->children();
|
|
|
|
TreeModel::Children::iterator ri;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
if ((i = find (track_views.begin(), track_views.end(), tv)) != track_views.end()) {
|
|
|
|
track_views.erase (i);
|
|
|
|
}
|
|
|
|
|
2005-10-26 14:12:00 -04:00
|
|
|
for (ri = rows.begin(); ri != rows.end(); ++ri) {
|
|
|
|
if ((*ri)[route_display_columns.tv] == tv) {
|
|
|
|
route_display_model->erase (ri);
|
2005-09-25 14:42:24 -04:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/* since the editor mixer goes away when you remove a route, set the
|
|
|
|
* button to inacttive
|
|
|
|
*/
|
|
|
|
editor_mixer_button.set_active(false);
|
|
|
|
|
|
|
|
/* and disable if all tracks and/or routes are gone */
|
|
|
|
|
|
|
|
if (track_views.size() == 0) {
|
|
|
|
editor_mixer_button.set_sensitive(false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
Editor::route_name_changed (TimeAxisView *tv)
|
|
|
|
{
|
2005-10-26 14:12:00 -04:00
|
|
|
ENSURE_GUI_THREAD(bind (mem_fun(*this, &Editor::route_name_changed), tv));
|
|
|
|
|
|
|
|
TreeModel::Children rows = route_display_model->children();
|
|
|
|
TreeModel::Children::iterator i;
|
|
|
|
|
|
|
|
for (i = rows.begin(); i != rows.end(); ++i) {
|
|
|
|
if ((*i)[route_display_columns.tv] == tv) {
|
|
|
|
(*i)[route_display_columns.text] = tv->name();
|
2005-09-25 14:42:24 -04:00
|
|
|
break;
|
|
|
|
}
|
2005-10-26 14:12:00 -04:00
|
|
|
}
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2005-10-26 14:12:00 -04:00
|
|
|
Editor::route_display_selection_changed ()
|
2005-09-25 14:42:24 -04:00
|
|
|
{
|
|
|
|
|
2005-10-26 14:12:00 -04:00
|
|
|
TimeAxisView *tv;
|
|
|
|
TreeModel::Children rows = route_display_model->children();
|
|
|
|
TreeModel::Children::iterator i;
|
|
|
|
Glib::RefPtr<TreeSelection> selection = route_list.get_selection();
|
|
|
|
|
|
|
|
for (i = rows.begin(); i != rows.end(); ++i) {
|
|
|
|
tv = (*i)[route_display_columns.tv];
|
2005-12-12 15:54:55 -05:00
|
|
|
if (!selection->is_selected (i)) {
|
2005-12-06 10:14:37 -05:00
|
|
|
tv->set_marked_for_display (false);
|
2005-10-26 14:12:00 -04:00
|
|
|
} else {
|
|
|
|
AudioTimeAxisView *atv;
|
2005-12-06 10:14:37 -05:00
|
|
|
tv->set_marked_for_display (true);
|
2005-10-26 14:12:00 -04:00
|
|
|
if ((atv = dynamic_cast<AudioTimeAxisView*>(tv)) != 0) {
|
|
|
|
if (current_mixer_strip && &(atv->route()) == &(current_mixer_strip->route())) {
|
|
|
|
// this will hide the mixer strip
|
|
|
|
set_selected_mixer_strip(*atv);
|
|
|
|
}
|
2005-09-25 14:42:24 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2005-10-26 14:12:00 -04:00
|
|
|
|
|
|
|
route_list_reordered ();
|
2005-09-25 14:42:24 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2005-11-12 17:07:07 -05:00
|
|
|
Editor::unselect_strip_in_display (TimeAxisView& tv)
|
2005-09-25 14:42:24 -04:00
|
|
|
{
|
2005-10-26 14:12:00 -04:00
|
|
|
TreeModel::Children rows = route_display_model->children();
|
|
|
|
TreeModel::Children::iterator i;
|
|
|
|
Glib::RefPtr<TreeSelection> selection = route_list.get_selection();
|
|
|
|
|
|
|
|
for (i = rows.begin(); i != rows.end(); ++i) {
|
2005-11-12 17:07:07 -05:00
|
|
|
if ((*i)[route_display_columns.tv] == &tv) {
|
2005-10-26 14:12:00 -04:00
|
|
|
selection->unselect (*i);
|
|
|
|
}
|
2005-09-25 14:42:24 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2005-10-26 14:12:00 -04:00
|
|
|
Editor::select_strip_in_display (TimeAxisView* tv)
|
2005-09-25 14:42:24 -04:00
|
|
|
{
|
2005-10-26 14:12:00 -04:00
|
|
|
TreeModel::Children rows = route_display_model->children();
|
|
|
|
TreeModel::Children::iterator i;
|
|
|
|
Glib::RefPtr<TreeSelection> selection = route_list.get_selection();
|
|
|
|
|
|
|
|
for (i = rows.begin(); i != rows.end(); ++i) {
|
|
|
|
if ((*i)[route_display_columns.tv] == tv) {
|
|
|
|
selection->select (*i);
|
|
|
|
}
|
2005-09-25 14:42:24 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2005-10-26 14:12:00 -04:00
|
|
|
Editor::queue_route_list_reordered ()
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
{
|
|
|
|
/* the problem here is that we are called *before* the
|
|
|
|
list has been reordered. so just queue up
|
|
|
|
the actual re-drawer to happen once the re-ordering
|
|
|
|
is complete.
|
|
|
|
*/
|
|
|
|
|
2005-10-26 14:12:00 -04:00
|
|
|
Glib::signal_idle().connect (mem_fun(*this, &Editor::route_list_reordered));
|
2005-09-25 14:42:24 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
Editor::redisplay_route_list ()
|
|
|
|
{
|
|
|
|
route_list_reordered ();
|
|
|
|
}
|
|
|
|
|
|
|
|
gint
|
|
|
|
Editor::route_list_reordered ()
|
|
|
|
{
|
2005-10-26 14:12:00 -04:00
|
|
|
TreeModel::Children rows = route_display_model->children();
|
|
|
|
TreeModel::Children::iterator i;
|
2005-12-23 10:34:02 -05:00
|
|
|
uint32_t position;
|
|
|
|
uint32_t order;
|
2005-12-12 15:54:55 -05:00
|
|
|
int n;
|
2005-10-26 14:12:00 -04:00
|
|
|
|
2005-12-23 10:34:02 -05:00
|
|
|
for (n = 0, order = 0, position = 0, i = rows.begin(); i != rows.end(); ++i, ++order) {
|
2005-12-17 08:39:27 -05:00
|
|
|
TimeAxisView *tv = (*i)[route_display_columns.tv];
|
2005-10-26 14:12:00 -04:00
|
|
|
AudioTimeAxisView* at;
|
2005-09-25 14:42:24 -04:00
|
|
|
if (!ignore_route_list_reorder) {
|
|
|
|
|
|
|
|
/* this reorder is caused by user action, so reassign sort order keys
|
|
|
|
to tracks.
|
|
|
|
*/
|
|
|
|
|
|
|
|
if ((at = dynamic_cast<AudioTimeAxisView*> (tv)) != 0) {
|
2005-12-23 10:34:02 -05:00
|
|
|
at->route().set_order_key (N_("editor"), position);
|
2005-09-25 14:42:24 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
if (tv->marked_for_display()) {
|
2005-12-23 10:34:02 -05:00
|
|
|
position += tv->show_at (position, n, &edit_controls_vbox);
|
|
|
|
position += track_spacing;
|
2005-09-25 14:42:24 -04:00
|
|
|
} else {
|
|
|
|
tv->hide ();
|
|
|
|
}
|
|
|
|
|
|
|
|
n++;
|
2005-10-26 14:12:00 -04:00
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
}
|
2005-12-12 15:54:55 -05:00
|
|
|
|
2005-12-23 10:34:02 -05:00
|
|
|
controls_layout.queue_resize ();
|
2005-09-25 14:42:24 -04:00
|
|
|
reset_scrolling_region ();
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
Editor::hide_all_tracks (bool with_select)
|
|
|
|
{
|
2005-10-26 14:12:00 -04:00
|
|
|
TreeModel::Children rows = route_display_model->children();
|
|
|
|
TreeModel::Children::iterator i;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2005-10-26 14:12:00 -04:00
|
|
|
// GTK2FIX
|
|
|
|
// track_display_list.freeze ();
|
|
|
|
|
|
|
|
for (i = rows.begin(); i != rows.end(); ++i) {
|
|
|
|
|
|
|
|
TreeModel::Row row = (*i);
|
|
|
|
TimeAxisView *tv = row[route_display_columns.tv];
|
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
if (with_select) {
|
2005-10-26 14:12:00 -04:00
|
|
|
route_list.get_selection()->unselect (i);
|
2005-09-25 14:42:24 -04:00
|
|
|
} else {
|
2005-10-26 14:12:00 -04:00
|
|
|
tv->set_marked_for_display (false);
|
2005-09-25 14:42:24 -04:00
|
|
|
tv->hide();
|
2005-10-26 14:12:00 -04:00
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
}
|
|
|
|
}
|
2005-10-26 14:12:00 -04:00
|
|
|
//route_list.thaw ();
|
2005-09-25 14:42:24 -04:00
|
|
|
reset_scrolling_region ();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2005-10-26 14:12:00 -04:00
|
|
|
Editor::route_list_column_click ()
|
2005-09-25 14:42:24 -04:00
|
|
|
{
|
|
|
|
if (route_list_menu == 0) {
|
|
|
|
build_route_list_menu ();
|
|
|
|
}
|
|
|
|
|
|
|
|
route_list_menu->popup (0, 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
Editor::build_route_list_menu ()
|
|
|
|
{
|
2005-10-26 14:12:00 -04:00
|
|
|
using namespace Menu_Helpers;
|
|
|
|
using namespace Gtk;
|
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
route_list_menu = new Menu;
|
|
|
|
|
|
|
|
MenuList& items = route_list_menu->items();
|
|
|
|
route_list_menu->set_name ("ArdourContextMenu");
|
|
|
|
|
2005-09-25 17:19:23 -04:00
|
|
|
items.push_back (MenuElem (_("Show All"), mem_fun(*this, &Editor::select_all_routes)));
|
|
|
|
items.push_back (MenuElem (_("Hide All"), mem_fun(*this, &Editor::unselect_all_routes)));
|
|
|
|
items.push_back (MenuElem (_("Show All AbstractTracks"), mem_fun(*this, &Editor::select_all_audiotracks)));
|
|
|
|
items.push_back (MenuElem (_("Hide All AbstractTracks"), mem_fun(*this, &Editor::unselect_all_audiotracks)));
|
|
|
|
items.push_back (MenuElem (_("Show All AudioBus"), mem_fun(*this, &Editor::select_all_audiobus)));
|
|
|
|
items.push_back (MenuElem (_("Hide All AudioBus"), mem_fun(*this, &Editor::unselect_all_audiobus)));
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
Editor::unselect_all_routes ()
|
|
|
|
{
|
|
|
|
hide_all_tracks (true);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
Editor::select_all_routes ()
|
|
|
|
|
|
|
|
{
|
2005-10-26 14:12:00 -04:00
|
|
|
TreeModel::Children rows = route_display_model->children();
|
|
|
|
TreeModel::Children::iterator i;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2005-10-26 14:12:00 -04:00
|
|
|
for (i = rows.begin(); i != rows.end(); ++i) {
|
|
|
|
route_list.get_selection()->select (i);
|
2005-09-25 14:42:24 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
Editor::select_all_audiotracks ()
|
|
|
|
{
|
2005-10-26 14:12:00 -04:00
|
|
|
TreeModel::Children rows = route_display_model->children();
|
|
|
|
TreeModel::Children::iterator i;
|
|
|
|
|
|
|
|
for (i = rows.begin(); i != rows.end(); ++i) {
|
|
|
|
TreeModel::Row row = (*i);
|
|
|
|
TimeAxisView* tv = row[route_display_columns.tv];
|
2005-09-25 14:42:24 -04:00
|
|
|
AudioTimeAxisView* atv;
|
|
|
|
|
|
|
|
if ((atv = dynamic_cast<AudioTimeAxisView*>(tv)) != 0) {
|
|
|
|
if (atv->is_audio_track()) {
|
2005-10-26 14:12:00 -04:00
|
|
|
route_list.get_selection()->select (i);
|
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2005-10-26 14:12:00 -04:00
|
|
|
void
|
2005-09-25 14:42:24 -04:00
|
|
|
Editor::unselect_all_audiotracks ()
|
|
|
|
{
|
2005-10-26 14:12:00 -04:00
|
|
|
TreeModel::Children rows = route_display_model->children();
|
|
|
|
TreeModel::Children::iterator i;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2005-10-26 14:12:00 -04:00
|
|
|
for (i = rows.begin(); i != rows.end(); ++i) {
|
|
|
|
TreeModel::Row row = (*i);
|
|
|
|
TimeAxisView *tv = row[route_display_columns.tv];
|
2005-09-25 14:42:24 -04:00
|
|
|
AudioTimeAxisView* atv;
|
|
|
|
|
|
|
|
if ((atv = dynamic_cast<AudioTimeAxisView*>(tv)) != 0) {
|
|
|
|
if (atv->is_audio_track()) {
|
2005-10-26 14:12:00 -04:00
|
|
|
route_list.get_selection()->unselect (i);
|
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
Editor::select_all_audiobus ()
|
|
|
|
{
|
2005-10-26 14:12:00 -04:00
|
|
|
TreeModel::Children rows = route_display_model->children();
|
|
|
|
TreeModel::Children::iterator i;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2005-10-26 14:12:00 -04:00
|
|
|
for (i = rows.begin(); i != rows.end(); ++i) {
|
|
|
|
TreeModel::Row row = (*i);
|
|
|
|
TimeAxisView* tv = row[route_display_columns.tv];
|
2005-09-25 14:42:24 -04:00
|
|
|
AudioTimeAxisView* atv;
|
|
|
|
|
|
|
|
if ((atv = dynamic_cast<AudioTimeAxisView*>(tv)) != 0) {
|
|
|
|
if (!atv->is_audio_track()) {
|
2005-10-26 14:12:00 -04:00
|
|
|
route_list.get_selection()->select (i);
|
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
Editor::unselect_all_audiobus ()
|
|
|
|
{
|
2005-10-26 14:12:00 -04:00
|
|
|
TreeModel::Children rows = route_display_model->children();
|
|
|
|
TreeModel::Children::iterator i;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2005-10-26 14:12:00 -04:00
|
|
|
for (i = rows.begin(); i != rows.end(); ++i) {
|
|
|
|
TreeModel::Row row = (*i);
|
|
|
|
TimeAxisView* tv = row[route_display_columns.tv];
|
2005-09-25 14:42:24 -04:00
|
|
|
AudioTimeAxisView* atv;
|
|
|
|
|
|
|
|
if ((atv = dynamic_cast<AudioTimeAxisView*>(tv)) != 0) {
|
|
|
|
if (!atv->is_audio_track()) {
|
2005-10-26 14:12:00 -04:00
|
|
|
route_list.get_selection()->unselect (i);
|
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
gint
|
2005-10-26 14:12:00 -04:00
|
|
|
Editor::route_list_compare_func (TreeModel::iterator a, TreeModel::iterator b)
|
2005-09-25 14:42:24 -04:00
|
|
|
{
|
|
|
|
TimeAxisView *tv1;
|
|
|
|
TimeAxisView *tv2;
|
|
|
|
AudioTimeAxisView *atv1;
|
|
|
|
AudioTimeAxisView *atv2;
|
|
|
|
Route* ra;
|
|
|
|
Route* rb;
|
|
|
|
|
2005-10-26 14:12:00 -04:00
|
|
|
tv1 = (*a)[route_display_columns.tv];
|
|
|
|
tv2 = (*b)[route_display_columns.tv];
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
if ((atv1 = dynamic_cast<AudioTimeAxisView*>(tv1)) == 0 ||
|
|
|
|
(atv2 = dynamic_cast<AudioTimeAxisView*>(tv2)) == 0) {
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
ra = &atv1->route();
|
|
|
|
rb = &atv2->route();
|
|
|
|
|
|
|
|
/* use of ">" forces the correct sort order */
|
|
|
|
|
|
|
|
return ra->order_key ("editor") > rb->order_key ("editor");
|
|
|
|
}
|
|
|
|
|