diff options
author | Florian Jung <flo@windfisch.org> | 2011-05-16 12:16:44 +0000 |
---|---|---|
committer | Florian Jung <flo@windfisch.org> | 2011-05-16 12:16:44 +0000 |
commit | 2cf9d99932d8f45d5508c45729bea7af4e6ec8fd (patch) | |
tree | ea423f965efa83e841e267778f537af8de28a953 /muse2/muse/midieditor.cpp | |
parent | 4e1ca61b03bab50d5e71e6da433503ac3b4470c0 (diff) | |
parent | 38988a37365c8772da11f3f41d49e5c1fd083084 (diff) |
set focus policy to strong in all editors
merged with trunk
Diffstat (limited to 'muse2/muse/midieditor.cpp')
-rw-r--r-- | muse2/muse/midieditor.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/muse2/muse/midieditor.cpp b/muse2/muse/midieditor.cpp index 2a6d8750..f4d21320 100644 --- a/muse2/muse/midieditor.cpp +++ b/muse2/muse/midieditor.cpp @@ -226,3 +226,30 @@ void MidiEditor::setCurCanvasPart(Part* part) canvas->setCurrentPart(part); } +void MidiEditor::horizontalZoomIn() +{ + printf("zoom in \n"); + int mag = hscroll->mag(); + int zoomlvl = ScrollScale::getQuickZoomLevel(mag); + if (zoomlvl < 23) + zoomlvl++; + + int newmag = ScrollScale::convertQuickZoomLevelToMag(zoomlvl); + + hscroll->setMag(newmag); + +} + +void MidiEditor::horizontalZoomOut() +{ + printf("zoom out \n"); + int mag = hscroll->mag(); + int zoomlvl = ScrollScale::getQuickZoomLevel(mag); + if (zoomlvl > 1) + zoomlvl--; + + int newmag = ScrollScale::convertQuickZoomLevelToMag(zoomlvl); + + hscroll->setMag(newmag); + +} |