# HG changeset patch # User Chris Cannam # Date 1177684504 0 # Node ID 5105be027d8e24bbfe823170995b1bb9af9a2132 # Parent 92dc881926daca9e73e12630546aac84ecdbfbe0 * Fix #1707650 refreshes not happening diff -r 92dc881926da -r 5105be027d8e view/Pane.cpp --- a/view/Pane.cpp Fri Apr 27 13:46:00 2007 +0000 +++ b/view/Pane.cpp Fri Apr 27 14:35:04 2007 +0000 @@ -1537,7 +1537,7 @@ } } - std::cerr << "new level is " << level << std::endl; +// std::cerr << "new level is " << level << std::endl; setZoomLevel(level); } diff -r 92dc881926da -r 5105be027d8e view/View.cpp --- a/view/View.cpp Fri Apr 27 13:46:00 2007 +0000 +++ b/view/View.cpp Fri Apr 27 14:35:04 2007 +0000 @@ -415,7 +415,7 @@ View::getZoomLevel() const { #ifdef DEBUG_VIEW_WIDGET_PAINT - std::cout << "zoom level: " << m_zoomLevel << std::endl; +// std::cout << "zoom level: " << m_zoomLevel << std::endl; #endif return m_zoomLevel; } @@ -888,6 +888,9 @@ void View::viewZoomLevelChanged(View *p, unsigned long z, bool locked) { +#ifdef DEBUG_VIEW_WIDGET_PAINT + std::cerr << "View[" << this << "]: viewZoomLevelChanged(" << p << ", " << z << ", " << locked << ")" << std::endl; +#endif if (m_followZoom && p != this && locked) { setZoomLevel(z); } @@ -1272,6 +1275,12 @@ } if (!scrollables.empty()) { + +#ifdef DEBUG_VIEW_WIDGET_PAINT + std::cerr << "View(" << this << "): cache " << m_cache << ", cache zoom " + << m_cacheZoomLevel << ", zoom " << m_zoomLevel << std::endl; +#endif + if (!m_cache || m_cacheZoomLevel != m_zoomLevel || width() != m_cache->width() || @@ -1280,6 +1289,8 @@ // cache is not valid if (cacheRect.width() < width()/10) { + delete m_cache; + m_cache = 0; #ifdef DEBUG_VIEW_WIDGET_PAINT std::cerr << "View(" << this << ")::paintEvent: small repaint, not bothering to recreate cache" << std::endl; #endif