Skip to content
Snippets Groups Projects

[fix] Allow applying a property to a proxy of the same group in LoadLidarState

Merged MelanieCarriere requested to merge allowApplyPropertyToTheProxyGroup into master
All threads resolved!
3 files
+ 51
0
Compare changes
  • Side-by-side
  • Inline
Files
3
  • During loadLidarState function, the property was applied only if a proxy of the same name of the one saved was found in the pipeline.
    For exemple :
    If you save the LidarState with a LidarPacketInterpreter i1 and you open a file using a LidarPacketInterpreter i2
    The properties saved from i1 couldn't be applied to i2.
    This commit allows applying the property to a proxy of the same group.
    
    If the property is not found in this proxy, the message is still display to the user.
@@ -91,6 +91,14 @@ void lqLoadLidarStateReaction::onTriggered()
std::string propertyName = currentProp.propertyName;
vtkSMProxy* lidarProxy = SearchProxyByName(lidarCurrentProxy, proxyName);
// If the proxy is not found, search proxy from the same proxygroup
// ex : Apply a property from an other LidarPacketInterpreter to the current one
if (lidarProxy == nullptr)
{
std::string proxyGroupName = GetGroupName(lidarCurrentProxy, proxyName);
lidarProxy = SearchProxyByGroupName(lidarCurrentProxy, proxyGroupName);
}
if (lidarProxy == nullptr)
{
std::string message = "No matching proxy found. Property " + propertyName + " of the proxy " + proxyName + " not applied";
Loading