Skip to content
Permalink
Browse files

[processing] Fix crash when renaming conditional branch in modeler

Fixes #39053
  • Loading branch information
nyalldawson committed Oct 6, 2020
1 parent f3c9f9b commit ddae53b7b789467bf17b21d6f4b884e827fbd3c5
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/gui/processing/models/qgsmodelgraphicsscene.cpp
@@ -201,13 +201,18 @@ void QgsModelGraphicsScene::createItems( QgsProcessingModelAlgorithm *model, Qgs
// find branch link point
const QgsProcessingOutputDefinitions outputs = model->childAlgorithm( depend.childId ).algorithm()->outputDefinitions();
int i = 0;
bool found = false;
for ( const QgsProcessingOutputDefinition *output : outputs )
{
if ( output->name() == depend.conditionalBranch )
{
found = true;
break;
}
i++;
}
addItem( new QgsModelArrowItem( mChildAlgorithmItems.value( depend.childId ), Qt::BottomEdge, i, QgsModelArrowItem::Marker::Circle, mChildAlgorithmItems.value( it.value().childId() ), QgsModelArrowItem::Marker::ArrowHead ) );
if ( found )
addItem( new QgsModelArrowItem( mChildAlgorithmItems.value( depend.childId ), Qt::BottomEdge, i, QgsModelArrowItem::Marker::Circle, mChildAlgorithmItems.value( it.value().childId() ), QgsModelArrowItem::Marker::ArrowHead ) );
}
}
}

0 comments on commit ddae53b

Please sign in to comment.
You can’t perform that action at this time.