# HG changeset patch # User Chris Cannam # Date 1233240957 0 # Node ID 3f4b10e76ccdf5f053f5232dcd473cf981165bae # Parent efc2bd6d36116dd38f43edfd53d814f9b4954318 * add setLayerDormant diff -r efc2bd6d3611 -r 3f4b10e76ccd layer/Colour3DPlotLayer.cpp --- a/layer/Colour3DPlotLayer.cpp Thu Jan 29 14:17:12 2009 +0000 +++ b/layer/Colour3DPlotLayer.cpp Thu Jan 29 14:55:57 2009 +0000 @@ -371,6 +371,30 @@ return m_opaque; } +void +Colour3DPlotLayer::setLayerDormant(const View *v, bool dormant) +{ + if (dormant) { + +#ifdef DEBUG_COLOUR_3D_PLOT_LAYER_PAINT + std::cerr << "Colour3DPlotLayer::setLayerDormant(" << dormant << ")" + << std::endl; +#endif + + if (isLayerDormant(v)) { + return; + } + + Layer::setLayerDormant(v, true); + + cacheInvalid(); + + } else { + + Layer::setLayerDormant(v, false); + } +} + bool Colour3DPlotLayer::isLayerScrollable(const View *v) const { diff -r efc2bd6d3611 -r 3f4b10e76ccd layer/Colour3DPlotLayer.h --- a/layer/Colour3DPlotLayer.h Thu Jan 29 14:17:12 2009 +0000 +++ b/layer/Colour3DPlotLayer.h Thu Jan 29 14:55:57 2009 +0000 @@ -60,6 +60,8 @@ size_t &resolution, SnapType snap) const; + virtual void setLayerDormant(const View *v, bool dormant); + virtual bool isLayerScrollable(const View *v) const; virtual ColourSignificance getLayerColourSignificance() const {