diff options
author | Robert Jonsson <spamatica@gmail.com> | 2010-08-10 21:03:48 +0000 |
---|---|---|
committer | Robert Jonsson <spamatica@gmail.com> | 2010-08-10 21:03:48 +0000 |
commit | b65c84801a237b5b5e54df963c1dd45c8fa1a059 (patch) | |
tree | 6e947a6db180b08949db6a9d1599d6689ad42294 | |
parent | ea58b2ff256fca07ff62ecb5e3eacef63202701b (diff) |
grid reacts to resolution change
-rw-r--r-- | muse/ChangeLog | 2 | ||||
-rw-r--r-- | muse/muse/arranger/pcanvas.cpp | 23 |
2 files changed, 15 insertions, 10 deletions
diff --git a/muse/ChangeLog b/muse/ChangeLog index 5c5dde61..8bc7f044 100644 --- a/muse/ChangeLog +++ b/muse/ChangeLog @@ -1,3 +1,5 @@ +10.08.2010 + * Fixed/Changed: Grid reacts to midi resolution change (rj) 01.08.2010 * Added: Move track selection when part selection is moved (rj) 24.07.2010 diff --git a/muse/muse/arranger/pcanvas.cpp b/muse/muse/arranger/pcanvas.cpp index b43c3550..a481fd8c 100644 --- a/muse/muse/arranger/pcanvas.cpp +++ b/muse/muse/arranger/pcanvas.cpp @@ -2655,16 +2655,19 @@ void PartCanvas::drawCanvas(QPainter& p, const QRect& rect) // append int noDivisors=0; - switch (*_raster) { - case 768: // 1/2 - noDivisors=2; break; - case 384: // 1/4 - noDivisors=4; break; - case 192: // 1/8 - noDivisors=8; break; - case 96: // 1/16 - noDivisors=16; break; - } + if (*_raster == config.division *2) // 1/2 + noDivisors=2; + else if (*_raster== config.division) // 1/4 + noDivisors=4; + else if (*_raster==config.division/2) // 1/8 + noDivisors=8; + else if (*_raster==config.division/4) // 1/16 + noDivisors=16; + else if (*_raster==config.division/8) // 1/16 + noDivisors=32; + else if (*_raster==config.division/16) // 1/16 + noDivisors=64; + int r = *_raster; int rr = rmapx(r); if (*_raster > 1) { |