Mercurial > hg > svgui
diff widgets/LevelPanWidget.cpp @ 927:271e729c818b tonioni
Fix to pointer-pos-to-level logic
author | Chris Cannam |
---|---|
date | Tue, 24 Mar 2015 16:40:55 +0000 |
parents | bfeabe25a1a3 |
children | 20698aa6a517 |
line wrap: on
line diff
--- a/widgets/LevelPanWidget.cpp Tue Mar 24 16:08:36 2015 +0000 +++ b/widgets/LevelPanWidget.cpp Tue Mar 24 16:40:55 2015 +0000 @@ -176,7 +176,7 @@ int npan = maxPan * 2 + 1; int nlevel = maxLevel + 1; double wcell = w / npan, hcell = h / nlevel; - level = int((h - loc.y()) / hcell) + 1; + level = int((h - loc.y()) / hcell); if (level < 0) level = 0; if (level > maxLevel) level = maxLevel; pan = int(loc.x() / wcell) - maxPan;