Skip to content

Commit 010295f

Browse files
committed
emit dataChanged in setData because Qt says to do so
1 parent 0475ff9 commit 010295f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/app/qgssnappinglayertreemodel.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,7 @@ bool QgsSnappingLayerTreeModel::setData( const QModelIndex &index, const QVarian
550550
config.setIndividualLayerSettings( vl, ls );
551551
mProject->setSnappingConfig( config );
552552
}
553+
emit dataChanged( index, index );
553554
return true;
554555
}
555556

@@ -572,6 +573,7 @@ bool QgsSnappingLayerTreeModel::setData( const QModelIndex &index, const QVarian
572573
QgsSnappingConfig config = mProject->snappingConfig();
573574
config.setIndividualLayerSettings( vl, ls );
574575
mProject->setSnappingConfig( config );
576+
emit dataChanged( index, index );
575577
return true;
576578
}
577579
}
@@ -592,6 +594,7 @@ bool QgsSnappingLayerTreeModel::setData( const QModelIndex &index, const QVarian
592594
QgsSnappingConfig config = mProject->snappingConfig();
593595
config.setIndividualLayerSettings( vl, ls );
594596
mProject->setSnappingConfig( config );
597+
emit dataChanged( index, index );
595598
return true;
596599
}
597600
}
@@ -612,6 +615,7 @@ bool QgsSnappingLayerTreeModel::setData( const QModelIndex &index, const QVarian
612615
QgsSnappingConfig config = mProject->snappingConfig();
613616
config.setIndividualLayerSettings( vl, ls );
614617
mProject->setSnappingConfig( config );
618+
emit dataChanged( index, index );
615619
return true;
616620
}
617621
}
@@ -632,6 +636,7 @@ bool QgsSnappingLayerTreeModel::setData( const QModelIndex &index, const QVarian
632636
avoidIntersectionsList.removeAll( vl );
633637

634638
mProject->setAvoidIntersectionsLayers( avoidIntersectionsList );
639+
emit dataChanged( index, index );
635640
return true;
636641
}
637642
}

0 commit comments

Comments
 (0)