# HG changeset patch # User Chris Cannam # Date 1138987847 0 # Node ID a1a6acb7cd378150044b4c9743098a1fecc2cc1a # Parent 5da86cc182bd36eb82c78fe9025265b0923060cf * Some fixes to waveform layer greyscaling * Tidying in panner class diff -r 5da86cc182bd -r a1a6acb7cd37 base/View.cpp --- a/base/View.cpp Thu Feb 02 17:31:08 2006 +0000 +++ b/base/View.cpp Fri Feb 03 17:30:47 2006 +0000 @@ -32,7 +32,6 @@ QFrame(w), m_centreFrame(0), m_zoomLevel(1024), - m_newModel(true), m_followPan(true), m_followZoom(true), m_followPlay(PlaybackScrollPage), @@ -246,6 +245,12 @@ return (long(x) * long(m_zoomLevel)) + getStartFrame(); } +int +View::getZoomLevel() const +{ + return m_zoomLevel; +} + void View::setZoomLevel(size_t z) { @@ -291,7 +296,6 @@ connect(layer, SIGNAL(modelReplaced()), this, SLOT(modelReplaced())); - m_newModel = true; update(); emit propertyContainerAdded(layer); @@ -460,7 +464,6 @@ delete m_cache; m_cache = 0; - m_newModel = true; update(); } @@ -845,19 +848,6 @@ } } } -/*!!! -void -View::identifyLocalFeatures(bool on, int x, int y) -{ - for (LayerList::const_iterator i = m_layers.end(); i != m_layers.begin(); ) { - --i; -#ifdef DEBUG_VIEW_WIDGET_PAINT - std::cerr << "View::identifyLocalFeatures: calling on " << *i << std::endl; -#endif - if ((*i)->identifyLocalFeatures(on, x, y)) break; - } -} -*/ void View::paintEvent(QPaintEvent *e) @@ -870,10 +860,6 @@ return; } - if (m_newModel) { - m_newModel = false; - } - // ensure our constraints are met m_zoomLevel = getZoomConstraintBlockSize(m_zoomLevel, ZoomConstraint::RoundUp); diff -r 5da86cc182bd -r a1a6acb7cd37 base/View.h --- a/base/View.h Thu Feb 02 17:31:08 2006 +0000 +++ b/base/View.h Fri Feb 03 17:30:47 2006 +0000 @@ -96,9 +96,9 @@ long getFrameForX(int x) const; /** - * Return the zoom level, i.e. the number of frames per pixel. + * Return the zoom level, i.e. the number of frames per pixel */ - virtual int getZoomLevel() const { return m_zoomLevel; } + int getZoomLevel() const; /** * Set the zoom level, i.e. the number of frames per pixel. The @@ -228,7 +228,6 @@ size_t m_centreFrame; int m_zoomLevel; - bool m_newModel; bool m_followPan; bool m_followZoom; PlaybackFollowMode m_followPlay;