summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_route_list.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2006-01-05 03:18:44 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2006-01-05 03:18:44 +0000
commit2fcdf14e2b63753be7b9cd74a442fa5aefbfb401 (patch)
tree25c98b803239a87bfbf93a22d506bedef43b3e7c /gtk2_ardour/editor_route_list.cc
parentf020b4e1e66dedba8d150a646347ec2b02b8ac52 (diff)
lots of small fixes for various irritations, return of snapshots, region list hiding stuff, etc etc etc
git-svn-id: svn://localhost/trunk/ardour2@241 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_route_list.cc')
-rw-r--r--gtk2_ardour/editor_route_list.cc49
1 files changed, 15 insertions, 34 deletions
diff --git a/gtk2_ardour/editor_route_list.cc b/gtk2_ardour/editor_route_list.cc
index a3c295d47e..b8d280b2bb 100644
--- a/gtk2_ardour/editor_route_list.cc
+++ b/gtk2_ardour/editor_route_list.cc
@@ -63,7 +63,7 @@ Editor::handle_new_route (Route& route)
ignore_route_list_reorder = true;
- if (tv->marked_for_display()) {
+ if (!no_route_list_redisplay && tv->marked_for_display()) {
route_list_display.get_selection()->select (row);
}
@@ -90,7 +90,7 @@ Editor::handle_gui_changes (const string & what, void *src)
ENSURE_GUI_THREAD(bind (mem_fun(*this, &Editor::handle_gui_changes), what, src));
if (what == "track_height") {
- route_list_reordered ();
+ redisplay_route_list ();
}
}
@@ -147,7 +147,6 @@ Editor::route_name_changed (TimeAxisView *tv)
void
Editor::route_display_selection_changed ()
{
-
TimeAxisView *tv;
TreeModel::Children rows = route_display_model->children();
TreeModel::Children::iterator i;
@@ -155,6 +154,7 @@ Editor::route_display_selection_changed ()
for (i = rows.begin(); i != rows.end(); ++i) {
tv = (*i)[route_display_columns.tv];
+
if (!selection->is_selected (i)) {
tv->set_marked_for_display (false);
} else {
@@ -169,7 +169,7 @@ Editor::route_display_selection_changed ()
}
}
- route_list_reordered ();
+ redisplay_route_list ();
}
void
@@ -201,41 +201,33 @@ Editor::select_strip_in_display (TimeAxisView* tv)
}
void
-Editor::queue_route_list_reordered ()
-
+Editor::route_list_reordered (const TreeModel::Path& path,const TreeModel::iterator& iter,int* what)
{
- /* 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.
- */
-
- Glib::signal_idle().connect (mem_fun(*this, &Editor::route_list_reordered));
+ redisplay_route_list ();
}
void
Editor::redisplay_route_list ()
{
- route_list_reordered ();
-}
-
-gint
-Editor::route_list_reordered ()
-{
TreeModel::Children rows = route_display_model->children();
TreeModel::Children::iterator i;
uint32_t position;
uint32_t order;
int n;
-
+
+ if (no_route_list_redisplay) {
+ return;
+ }
+
for (n = 0, order = 0, position = 0, i = rows.begin(); i != rows.end(); ++i, ++order) {
TimeAxisView *tv = (*i)[route_display_columns.tv];
AudioTimeAxisView* at;
+
if (!ignore_route_list_reorder) {
- /* this reorder is caused by user action, so reassign sort order keys
- to tracks.
- */
+ /* this reorder is caused by user action, so reassign sort order keys
+ to tracks.
+ */
if ((at = dynamic_cast<AudioTimeAxisView*> (tv)) != 0) {
at->route().set_order_key (N_("editor"), order);
@@ -254,7 +246,6 @@ Editor::route_list_reordered ()
controls_layout.queue_resize ();
reset_scrolling_region ();
- return FALSE;
}
void
@@ -284,16 +275,6 @@ Editor::hide_all_tracks (bool with_select)
}
void
-Editor::route_list_column_click ()
-{
- if (route_list_menu == 0) {
- build_route_list_menu ();
- }
-
- route_list_menu->popup (0, 0);
-}
-
-void
Editor::build_route_list_menu ()
{
using namespace Menu_Helpers;