Mercurial > hg > svcore
changeset 1:a23739e2338a
* Debug
* Update copyrights to 2006
author | Chris Cannam |
---|---|
date | Thu, 12 Jan 2006 13:43:49 +0000 |
parents | da6937383da8 |
children | d86891498eef |
files | base/View.cpp |
diffstat | 1 files changed, 10 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/base/View.cpp Tue Jan 10 16:33:16 2006 +0000 +++ b/base/View.cpp Thu Jan 12 13:43:49 2006 +0000 @@ -2,7 +2,7 @@ /* A waveform viewer and audio annotation editor. - Chris Cannam, Queen Mary University of London, 2005 + Chris Cannam, Queen Mary University of London, 2005-2006 This is experimental software. Not for distribution. */ @@ -334,7 +334,7 @@ QObject *obj = sender(); #ifdef DEBUG_VIEW_WIDGET_PAINT - std::cerr << "View::modelChanged()" << std::endl; + std::cerr << "View(" << this << ")::modelChanged()" << std::endl; #endif delete m_cache; m_cache = 0; @@ -349,13 +349,13 @@ { QObject *obj = sender(); -#ifdef DEBUG_VIEW_WIDGET_PAINT - std::cerr << "View::modelChanged(" << startFrame << "," << endFrame << ")" << std::endl; -#endif - long myStartFrame = getStartFrame(); size_t myEndFrame = getEndFrame(); +#ifdef DEBUG_VIEW_WIDGET_PAINT + std::cerr << "View(" << this << ")::modelChanged(" << startFrame << "," << endFrame << ") [me " << myStartFrame << "," << myEndFrame << "]" << std::endl; +#endif + if (myStartFrame > 0 && endFrame < size_t(myStartFrame)) { checkProgress(obj); return; @@ -391,8 +391,11 @@ View::modelReplaced() { #ifdef DEBUG_VIEW_WIDGET_PAINT - std::cerr << "View::modelReplaced()" << std::endl; + std::cerr << "View(" << this << ")::modelReplaced()" << std::endl; #endif + delete m_cache; + m_cache = 0; + m_newModel = true; update(); }