Mercurial > hg > svgui
changeset 475:3f4b10e76ccd
* add setLayerDormant
author | Chris Cannam |
---|---|
date | Thu, 29 Jan 2009 14:55:57 +0000 |
parents | efc2bd6d3611 |
children | 2613bc1b2823 |
files | layer/Colour3DPlotLayer.cpp layer/Colour3DPlotLayer.h |
diffstat | 2 files changed, 26 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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 {
--- 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 {