Mercurial > hg > svcore
diff base/View.cpp @ 117:c30728d5625c sv1-v0.9rc1
* Make vertical scale alignment modes work in note layer as well as time-value
layer, and several significant fixes to it
* Make it possible to draw notes properly on the note layer
* Show units (and frequencies etc in note layer's case) in the time-value and
note layer description boxes
* Minor fix to item edit dialog layout
* Some minor menu rearrangement
* Comment out a lot of debug output
* Add SV website and reference URLs to Help menu, and add code to (attempt to)
open them in the user's preferred browser
author | Chris Cannam |
---|---|
date | Fri, 12 May 2006 14:40:43 +0000 |
parents | 1be256ac7681 |
children | e388730429b5 |
line wrap: on
line diff
--- a/base/View.cpp Thu May 11 15:02:14 2006 +0000 +++ b/base/View.cpp Fri May 12 14:40:43 2006 +0000 @@ -59,7 +59,7 @@ View::~View() { - std::cerr << "View::~View(" << this << ")" << std::endl; +// std::cerr << "View::~View(" << this << ")" << std::endl; m_deleting = true; delete m_propertyContainer; @@ -162,7 +162,7 @@ } bool -View::getValueExtents(QString unit, float &min, float &max) const +View::getValueExtents(QString unit, float &min, float &max, bool &log) const { bool have = false; @@ -170,14 +170,28 @@ i != m_layers.end(); ++i) { QString layerUnit; - float layerMin, layerMax; + float layerMin = 0.0, layerMax = 0.0; + float displayMin = 0.0, displayMax = 0.0; + bool layerLog = false; - if ((*i)->getValueExtents(layerMin, layerMax, layerUnit) && + if ((*i)->getValueExtents(layerMin, layerMax, layerLog, layerUnit) && layerUnit.toLower() == unit.toLower()) { - if (!have || layerMin < min) min = layerMin; - if (!have || layerMax > max) max = layerMax; - have = true; + if ((*i)->getDisplayExtents(displayMin, displayMax)) { + + min = displayMin; + max = displayMax; + log = layerLog; + have = true; + break; + + } else { + + if (!have || layerMin < min) min = layerMin; + if (!have || layerMax > max) max = layerMax; + if (layerLog) log = true; + have = true; + } } } @@ -245,7 +259,7 @@ void View::toolModeChanged() { - std::cerr << "View::toolModeChanged(" << m_manager->getToolMode() << ")" << std::endl; +// std::cerr << "View::toolModeChanged(" << m_manager->getToolMode() << ")" << std::endl; } long