Fixed AutoEvaluationPipeline not invalidating shared properties in onDataContainerDataAdded().

Fixed double connection to same slot of s_changed signal in VisualizationProcessor.
parent b1c69116
......@@ -39,6 +39,10 @@ namespace campvis {
, _fbo(0)
, _viewportSizeProperty(viewportSizeProp)
{
if (_viewportSizeProperty) {
_viewportSizeProperty->s_changed.connect<VisualizationProcessor>(this, &VisualizationProcessor::onPropertyChanged);
setPropertyInvalidationLevel(*_viewportSizeProperty, INVALID_RESULT);
}
}
VisualizationProcessor::~VisualizationProcessor() {
......@@ -51,12 +55,14 @@ namespace campvis {
addProperty(p_lqMode);
_fbo = new cgt::FramebufferObject();
_viewportSizeProperty->s_changed.connect<VisualizationProcessor>(this, &VisualizationProcessor::onPropertyChanged);
setPropertyInvalidationLevel(*_viewportSizeProperty, INVALID_RESULT);
}
void VisualizationProcessor::deinit() {
_viewportSizeProperty->s_changed.disconnect(this);
if (_viewportSizeProperty) {
_viewportSizeProperty->s_changed.disconnect(this);
_viewportSizeProperty = nullptr;
}
_viewportSizeProperty->s_changed.disconnect(this);
delete _fbo;
AbstractProcessor::deinit();
......@@ -169,9 +175,9 @@ namespace campvis {
}
void VisualizationProcessor::setViewportSizeProperty(IVec2Property* viewportSizeProp) {
cgtAssert(viewportSizeProp != 0, "Pointer must not be 0.");
cgtAssert(viewportSizeProp != nullptr, "Pointer must not be nullptr.");
if (_viewportSizeProperty != 0) {
if (_viewportSizeProperty != nullptr) {
_viewportSizeProperty->s_changed.disconnect(this);
}
......
// ================================================================================================
//
// This file is part of the CAMPVis Software Framework.
......@@ -101,6 +102,8 @@ namespace campvis {
p_lqMode.addSharedProperty(&_raycaster->p_lqMode);
p_inputVolume.s_changed.connect(this, &VolumeRenderer::onPropertyChanged);
_pgGenerator.s_invalidated.connect(this, &VolumeRenderer::onProcessorInvalidated);
_eepGenerator.s_invalidated.connect(this, &VolumeRenderer::onProcessorInvalidated);
_raycaster->s_invalidated.connect(this, &VolumeRenderer::onProcessorInvalidated);
......@@ -115,6 +118,8 @@ namespace campvis {
_eepGenerator.s_invalidated.disconnect(this);
_raycaster->s_invalidated.disconnect(this);
p_inputVolume.s_changed.disconnect(this);
_pgGenerator.deinit();
_eepGenerator.deinit();
_raycaster->deinit();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment