Skip to content

Commit 5e5fdf9

Browse files
committedApr 24, 2018
fix martin's review
1 parent 66b0e59 commit 5e5fdf9

File tree

4 files changed

+4
-8
lines changed

4 files changed

+4
-8
lines changed
 

‎src/core/layertree/qgslayertreemodellegendnode.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ bool QgsSymbolLegendNode::setData( const QVariant &value, int role )
331331
vlayer->renderer()->checkLegendSymbolItem( mItem.ruleKey(), value == Qt::Checked );
332332

333333
emit dataChanged();
334-
emit vlayer->styleChanged();
334+
vlayer->emitStyleChanged();
335335

336336
vlayer->triggerRepaint();
337337

‎src/core/qgspointlocator.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -637,9 +637,6 @@ QgsPointLocator::QgsPointLocator( QgsVectorLayer *layer, const QgsCoordinateRefe
637637
connect( mLayer, &QgsVectorLayer::featureDeleted, this, &QgsPointLocator::onFeatureDeleted );
638638
connect( mLayer, &QgsVectorLayer::geometryChanged, this, &QgsPointLocator::onGeometryChanged );
639639
connect( mLayer, &QgsVectorLayer::dataChanged, this, &QgsPointLocator::destroyIndex );
640-
connect( mLayer, &QgsVectorLayer::rendererChanged, this, &QgsPointLocator::destroyIndex );
641-
connect( mLayer, &QgsVectorLayer::styleChanged, this, &QgsPointLocator::destroyIndex );
642-
connect( mLayer, &QgsVectorLayer::layerModified, this, &QgsPointLocator::destroyIndex );
643640
}
644641

645642

@@ -669,6 +666,7 @@ void QgsPointLocator::setRenderContext( const QgsRenderContext &context )
669666
{
670667
mContext = std::unique_ptr<QgsRenderContext>( new QgsRenderContext( context ) );
671668

669+
connect( mLayer, &QgsVectorLayer::styleChanged, this, &QgsPointLocator::destroyIndex );
672670
destroyIndex();
673671
}
674672

@@ -740,10 +738,10 @@ bool QgsPointLocator::rebuildIndex( int maxFeaturesToIndex )
740738
if ( !f.hasGeometry() )
741739
continue;
742740

743-
if ( ctx && renderer )
741+
if ( filter && ctx && renderer )
744742
{
745743
ctx->expressionContext().setFeature( f );
746-
if ( filter && !renderer->willRenderFeature( f, *ctx ) )
744+
if ( !renderer->willRenderFeature( f, *ctx ) )
747745
{
748746
continue;
749747
}

‎src/core/qgspointlocator.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,6 @@ class CORE_EXPORT QgsPointLocator : public QObject
285285
//! flag whether the layer is currently empty (i.e. mRTree is null but it is not necessary to rebuild it)
286286
bool mIsEmptyLayer;
287287

288-
QgsFeatureIds mFeatureIds;
289288

290289
//! R-tree containing spatial index
291290
QgsCoordinateTransform mTransform;

‎tests/src/core/testqgssnappingutils.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@ class TestQgsSnappingUtils : public QObject
136136
QVERIFY( !m.hasVertex() );
137137

138138
u.setEnableSnappingForInvisibleFeature( true );
139-
mVL->styleChanged();
140139
m = u.snapToMap( QPoint( 2, 2 ) );
141140
QVERIFY( m.isValid() );
142141
QVERIFY( m.hasVertex() );

0 commit comments

Comments
 (0)
Please sign in to comment.