Skip to content

Commit

Permalink
[sensorthings] Don't allow expansion back to base entity type
Browse files Browse the repository at this point in the history
Avoids circular expansion

Fixes #59722
  • Loading branch information
nyalldawson committed Jan 31, 2025
1 parent 6bf6d04 commit 3c67408
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -774,6 +774,7 @@ QWidget *QgsSensorThingsExpansionsDelegate::createEditor( QWidget *parent, const
: index.model()->data( index.model()->index( index.row() - 1, 0 ), Qt::EditRole ).value<Qgis::SensorThingsEntity>();

QList<Qgis::SensorThingsEntity> compatibleEntities = QgsSensorThingsUtils::expandableTargets( entityType );
compatibleEntities.removeAll( mBaseEntityType );
// remove all entities which are already part of the expansion in previous rows -- we don't support "circular" expansion
for ( int row = index.row() - 1; row >= 0; row-- )
{
Expand Down

0 comments on commit 3c67408

Please sign in to comment.