Mercurial > hg > sonic-visualiser
changeset 2031:4db75d584e5a
Merge from branch zoom
author | Chris Cannam |
---|---|
date | Wed, 10 Oct 2018 08:58:20 +0100 |
parents | d70122abd746 (current diff) 337d16097516 (diff) |
children | 40eb06ba0f1f |
files | main/MainWindow.cpp repoint-lock.json repoint-project.json |
diffstat | 4 files changed, 19 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/main/MainWindow.cpp Wed Oct 03 15:46:18 2018 +0100 +++ b/main/MainWindow.cpp Wed Oct 10 08:58:20 2018 +0100 @@ -3867,7 +3867,7 @@ if (configuration.layer == LayerFactory::Spectrum) { pane->setPlaybackFollow(PlaybackScrollContinuous); pane->setFollowGlobalZoom(false); - pane->setZoomLevel(512); + pane->setZoomLevel(ZoomLevel(ZoomLevel::FramesPerPixel, 512)); } if (configuration.layer != LayerFactory::TimeRuler &&
--- a/main/OSCHandler.cpp Wed Oct 03 15:46:18 2018 +0100 +++ b/main/OSCHandler.cpp Wed Oct 10 08:58:20 2018 +0100 @@ -497,8 +497,17 @@ } else if (message.getArg(0).canConvert(QVariant::Double)) { double level = message.getArg(0).toDouble(); Pane *currentPane = m_paneStack->getCurrentPane(); - if (level < 1.0) level = 1.0; - if (currentPane) currentPane->setZoomLevel(int(lrint(level))); + ZoomLevel zoomLevel; + if (level >= 0.66) { + zoomLevel = ZoomLevel(ZoomLevel::FramesPerPixel, + int(round(level))); + } else { + zoomLevel = ZoomLevel(ZoomLevel::PixelsPerFrame, + int(round(1.0 / level))); + } + if (currentPane) { + currentPane->setZoomLevel(zoomLevel); + } } }
--- a/main/main.cpp Wed Oct 03 15:46:18 2018 +0100 +++ b/main/main.cpp Wed Oct 10 08:58:20 2018 +0100 @@ -349,8 +349,9 @@ // splash screen. PluginScan::getInstance()->scan(); - // Permit size_t and PropertyName to be used as args in queued signal calls + // Permit these types to be used as args in queued signal calls qRegisterMetaType<PropertyContainer::PropertyName>("PropertyContainer::PropertyName"); + qRegisterMetaType<ZoomLevel>("ZoomLevel"); MainWindow::SoundOptions options = MainWindow::WithEverything; if (!audioOutput) options = 0;
--- a/repoint-lock.json Wed Oct 03 15:46:18 2018 +0100 +++ b/repoint-lock.json Wed Oct 10 08:58:20 2018 +0100 @@ -4,13 +4,13 @@ "pin": "da86fb0bccb3" }, "svcore": { - "pin": "51d6551d5244" + "pin": "4de4284d0596" }, "svgui": { - "pin": "9fb7133dd818" + "pin": "86429ff00f05" }, "svapp": { - "pin": "9e15607531b2" + "pin": "b936872faff2" }, "checker": { "pin": "51a8fe0a03cf" @@ -31,10 +31,10 @@ "pin": "a766fe47501b" }, "bqresample": { - "pin": "a9a5555d9b6d" + "pin": "f5dee7d40378" }, "bqaudioio": { - "pin": "138a7a8b546b" + "pin": "b5e34fdc1716" }, "sv-dependency-builds": { "pin": "f1a9b270e043"