summaryrefslogtreecommitdiff
path: root/gtk2_ardour/time_axis_view.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-12-29 22:14:15 +0000
committerCarl Hetherington <carl@carlh.net>2011-12-29 22:14:15 +0000
commitb1775149307a157444c516693ad6b98a404ef1b2 (patch)
treeffdf04d8396cf53d5378c073a8d249150d5282eb /gtk2_ardour/time_axis_view.cc
parentcabb76cce6203d34299136371078bd20b6abe1e3 (diff)
Revert internals of the last layering-related commit, and go back a slightly-cleaned-up version of how it was before. Remove all layering modes; only option now is add-is-higher. Move-add-higher could easily be re-added if anyone uses it.
git-svn-id: svn://localhost/ardour2/branches/3.0@11111 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/time_axis_view.cc')
-rw-r--r--gtk2_ardour/time_axis_view.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc
index fe02a8bc15..79f425f32f 100644
--- a/gtk2_ardour/time_axis_view.cc
+++ b/gtk2_ardour/time_axis_view.cc
@@ -1196,7 +1196,7 @@ TimeAxisView::color_handler ()
* If the covering object is a child axis, then the child is returned.
* TimeAxisView is 0 otherwise.
* Layer index is the layer number (possibly fractional) if the TimeAxisView is valid
- * and is in stacked or expanded region display mode, otherwise 0.
+ * and is in stacked or expanded * region display mode, otherwise 0.
*/
std::pair<TimeAxisView*, double>
TimeAxisView::covers_y_position (double y)
@@ -1215,7 +1215,7 @@ TimeAxisView::covers_y_position (double y)
case Stacked:
if (view ()) {
/* compute layer */
- l = floor ((_y_position + height - y) / (view()->child_height ()));
+ l = layer_t ((_y_position + height - y) / (view()->child_height ()));
/* clamp to max layers to be on the safe side; sometimes the above calculation
returns a too-high value */
if (l >= view()->layers ()) {
@@ -1225,7 +1225,7 @@ TimeAxisView::covers_y_position (double y)
break;
case Expanded:
if (view ()) {
- int n = floor ((_y_position + height - y) / (view()->child_height ()));
+ int const n = floor ((_y_position + height - y) / (view()->child_height ()));
l = n * 0.5 - 0.5;
if (l >= (view()->layers() - 0.5)) {
l = view()->layers() - 0.5;