? commit.msg ? out Index: QVTKWidget.cxx =================================================================== RCS file: /cvsroot/ParaView3/ParaView3/VTK/GUISupport/Qt/QVTKWidget.cxx,v retrieving revision 1.34 diff -u -r1.34 QVTKWidget.cxx --- QVTKWidget.cxx 6 Nov 2006 18:14:46 -0000 1.34 +++ QVTKWidget.cxx 9 Nov 2006 19:44:05 -0000 @@ -52,6 +52,7 @@ #include "vtkConfigure.h" #include "vtkToolkits.h" #include "vtkUnsignedCharArray.h" +#include "vtkRendererCollection.h" // function to get VTK keysyms from ascii characters @@ -63,7 +64,6 @@ static void dirty_cache(vtkObject *, unsigned long, void *, void *); - #if QT_VERSION < 0x040000 /*! constructor */ QVTKWidget::QVTKWidget(QWidget* parent, const char* name, Qt::WFlags f) @@ -315,6 +315,7 @@ this->mRenWin->GetPixelData(0, 0, this->width()-1, this->height()-1, 1, this->mCachedImage); this->cachedImageCleanFlag = true; + cacheTime.Modified(); emit cachedImageClean(); } @@ -457,6 +458,21 @@ return; } + // check that the cache is up to date + if (this->cachedImageCleanFlag) + { + vtkRendererCollection* rens = this->mRenWin->GetRenderers(); + vtkCollectionSimpleIterator iter; + rens->InitTraversal(iter); + int numRenderers = rens->GetNumberOfItems(); + for(int i=0; iGetNextRenderer(iter)->GetMTime() > cacheTime) + { + this->cachedImageCleanFlag = false; + } + } + } // if we have a saved image, use it if (this->cachedImageCleanFlag) Index: QVTKWidget.h =================================================================== RCS file: /cvsroot/ParaView3/ParaView3/VTK/GUISupport/Qt/QVTKWidget.h,v retrieving revision 1.13 diff -u -r1.13 QVTKWidget.h --- QVTKWidget.h 18 Jun 2006 20:13:16 -0000 1.13 +++ QVTKWidget.h 9 Nov 2006 19:44:05 -0000 @@ -238,6 +238,7 @@ bool cachedImageCleanFlag; bool automaticImageCache; double maxImageCacheRenderRate; + vtkTimeStamp cacheTime; private: //! unimplemented operator=