Mercurial > hg > sonic-visualiser
comparison main/OSCHandler.cpp @ 312:3f0c98204636
* Add Zoom to Fit to OSC commands
author | Chris Cannam |
---|---|
date | Mon, 02 Mar 2009 14:29:14 +0000 |
parents | 9d772bee2095 |
children | 635b79462d3e |
comparison
equal
deleted
inserted
replaced
311:0e7d0cdb6ac7 | 312:3f0c98204636 |
---|---|
416 message.getArg(0).toString() == "out") { | 416 message.getArg(0).toString() == "out") { |
417 zoomOut(); | 417 zoomOut(); |
418 } else if (message.getArg(0).canConvert(QVariant::String) && | 418 } else if (message.getArg(0).canConvert(QVariant::String) && |
419 message.getArg(0).toString() == "default") { | 419 message.getArg(0).toString() == "default") { |
420 zoomDefault(); | 420 zoomDefault(); |
421 } else if (message.getArg(0).canConvert(QVariant::String) && | |
422 message.getArg(0).toString() == "fit") { | |
423 zoomToFit(); | |
421 } else if (message.getArg(0).canConvert(QVariant::Double)) { | 424 } else if (message.getArg(0).canConvert(QVariant::Double)) { |
422 double level = message.getArg(0).toDouble(); | 425 double level = message.getArg(0).toDouble(); |
423 Pane *currentPane = m_paneStack->getCurrentPane(); | 426 Pane *currentPane = m_paneStack->getCurrentPane(); |
424 if (level < 1.0) level = 1.0; | 427 if (level < 1.0) level = 1.0; |
425 if (currentPane) currentPane->setZoomLevel(lrint(level)); | 428 if (currentPane) currentPane->setZoomLevel(lrint(level)); |