summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_routes.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2011-07-07 00:37:13 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2011-07-07 00:37:13 +0000
commit10cb0a7646ae7da18e5e6f49b940a5e921a73b57 (patch)
tree9d23f3e2e5d961aa2520f51ebcf5ed9b64cf7c5c /gtk2_ardour/editor_routes.cc
parentd5bb72975523a35e65d94605de2abff01c3e6ce7 (diff)
introduce GUIObjectState; massive, pervasive changes in visibility and height management for track displays in the editor
git-svn-id: svn://localhost/ardour2/branches/3.0@9796 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_routes.cc')
-rw-r--r--gtk2_ardour/editor_routes.cc24
1 files changed, 11 insertions, 13 deletions
diff --git a/gtk2_ardour/editor_routes.cc b/gtk2_ardour/editor_routes.cc
index 65db793bb3..5113ca895a 100644
--- a/gtk2_ardour/editor_routes.cc
+++ b/gtk2_ardour/editor_routes.cc
@@ -468,21 +468,18 @@ EditorRoutes::redisplay ()
route->set_order_key (N_ ("editor"), n);
}
- bool visible = (*i)[_columns.visible];
+ bool visible = tv->marked_for_display ();
/* show or hide the TimeAxisView */
if (visible) {
- tv->set_marked_for_display (true);
position += tv->show_at (position, n, &_editor->edit_controls_vbox);
tv->clip_to_viewport ();
+ n++;
} else {
- tv->set_visibility (false);
+ tv->hide ();
}
-
- n++;
}
-
/* whenever we go idle, update the track view list to reflect the new order.
we can't do this here, because we could mess up something that is traversing
the track order and has caused a redisplay of the list.
@@ -534,14 +531,16 @@ EditorRoutes::visible_changed (std::string const & path)
TimeAxisView* tv = (*iter)[_columns.tv];
if (tv) {
bool visible = (*iter)[_columns.visible];
- (*iter)[_columns.visible] = !visible;
+
+ if (tv->set_marked_for_display (!visible)) {
+ _redisplay_does_not_reset_order_keys = true;
+ _session->set_remote_control_ids();
+ update_visibility ();
+ redisplay ();
+ _redisplay_does_not_reset_order_keys = false;
+ }
}
}
-
- _redisplay_does_not_reset_order_keys = true;
- _session->set_remote_control_ids();
- redisplay ();
- _redisplay_does_not_reset_order_keys = false;
}
void
@@ -700,7 +699,6 @@ EditorRoutes::update_visibility ()
for (i = rows.begin(); i != rows.end(); ++i) {
TimeAxisView *tv = (*i)[_columns.tv];
(*i)[_columns.visible] = tv->marked_for_display ();
- cerr << "marked " << tv->name() << " for display = " << tv->marked_for_display() << endl;
}
resume_redisplay ();