Commit 70194459 authored by Mathieu Westphal's avatar Mathieu Westphal

Correcting ProxyListDomain registration

ProxyListDomain were incorrectly registered, causing
memory leaks that were freed only when closing ParaView
This fixes it.
parent bb8d1db9
......@@ -586,6 +586,9 @@ bool vtkSMParaViewPipelineController::RegisterPipelineProxy(
SM_SCOPED_TRACE(RegisterPipelineProxy).arg("proxy", proxy);
// Register proxies created for proxy list domains.
this->RegisterProxiesForProxyListDomains(proxy);
// Create animation helpers for this proxy.
this->CreateAnimationHelpers(proxy);
......@@ -659,6 +662,9 @@ bool vtkSMParaViewPipelineController::RegisterViewProxy(vtkSMProxy* proxy, const
SM_SCOPED_TRACE(RegisterViewProxy).arg("proxy", proxy);
// Register proxies created for proxy list domains.
this->RegisterProxiesForProxyListDomains(proxy);
// Now register the proxy itself.
proxy->GetSessionProxyManager()->RegisterProxy("views", proxyname, proxy);
......@@ -776,9 +782,11 @@ bool vtkSMParaViewPipelineController::RegisterRepresentationProxy(vtkSMProxy* pr
return false;
}
// Register proxies created for proxy list domains.
this->RegisterProxiesForProxyListDomains(proxy);
// Register the proxy itself.
proxy->GetSessionProxyManager()->RegisterProxy("representations", proxy);
return true;
}
......@@ -844,6 +852,9 @@ bool vtkSMParaViewPipelineController::RegisterColorTransferFunctionProxy(
return false;
}
// Register proxies created for proxy list domains.
this->RegisterProxiesForProxyListDomains(proxy);
proxy->GetSessionProxyManager()->RegisterProxy("lookup_tables", proxyname, proxy);
return true;
}
......@@ -857,6 +868,9 @@ bool vtkSMParaViewPipelineController::RegisterOpacityTransferFunction(
return false;
}
// Register proxies created for proxy list domains.
this->RegisterProxiesForProxyListDomains(proxy);
proxy->GetSessionProxyManager()->RegisterProxy("piecewise_functions", proxyname, proxy);
return true;
}
......@@ -869,6 +883,9 @@ bool vtkSMParaViewPipelineController::RegisterAnimationProxy(vtkSMProxy* proxy)
return false;
}
// Register proxies created for proxy list domains.
this->RegisterProxiesForProxyListDomains(proxy);
proxy->GetSessionProxyManager()->RegisterProxy("animation", proxy);
return true;
}
......@@ -957,6 +974,9 @@ bool vtkSMParaViewPipelineController::RegisterLightProxy(
SM_SCOPED_TRACE(RegisterLightProxy).arg("proxy", proxy).arg("view", view);
// Register proxies created for proxy list domains.
this->RegisterProxiesForProxyListDomains(proxy);
// we would like the light to be a child of the view, but lights need to be created
// and registered independently, before the view is created in python state files.
// pxm->RegisterProxy(controller->GetHelperProxyGroupName(view), "lights", proxy);
......@@ -1120,10 +1140,6 @@ bool vtkSMParaViewPipelineController::PostInitializeProxy(vtkSMProxy* proxy)
}
proxy->UpdateVTKObjects();
}
// Register proxies created for proxy list domains.
this->RegisterProxiesForProxyListDomains(proxy);
return true;
}
......
......@@ -1183,7 +1183,6 @@ class ProxyProperty(Property):
name = listdomain.GetProxyName(i)
iproxy = CreateProxy(igroup, name)
listdomain.AddProxy(iproxy)
pm.RegisterProxy(group, proxy.GetPropertyName(smproperty), iproxy)
smproperty.ResetToDomainDefaults(False)
def GetAvailable(self):
......
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