Skip to content

Commit

Permalink
fix martin's review
Browse files Browse the repository at this point in the history
  • Loading branch information
lbartoletti committed Apr 24, 2018
1 parent 66b0e59 commit 5e5fdf9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/core/layertree/qgslayertreemodellegendnode.cpp
Expand Up @@ -331,7 +331,7 @@ bool QgsSymbolLegendNode::setData( const QVariant &value, int role )
vlayer->renderer()->checkLegendSymbolItem( mItem.ruleKey(), value == Qt::Checked );

emit dataChanged();
emit vlayer->styleChanged();
vlayer->emitStyleChanged();

vlayer->triggerRepaint();

Expand Down
8 changes: 3 additions & 5 deletions src/core/qgspointlocator.cpp
Expand Up @@ -637,9 +637,6 @@ QgsPointLocator::QgsPointLocator( QgsVectorLayer *layer, const QgsCoordinateRefe
connect( mLayer, &QgsVectorLayer::featureDeleted, this, &QgsPointLocator::onFeatureDeleted );
connect( mLayer, &QgsVectorLayer::geometryChanged, this, &QgsPointLocator::onGeometryChanged );
connect( mLayer, &QgsVectorLayer::dataChanged, this, &QgsPointLocator::destroyIndex );
connect( mLayer, &QgsVectorLayer::rendererChanged, this, &QgsPointLocator::destroyIndex );
connect( mLayer, &QgsVectorLayer::styleChanged, this, &QgsPointLocator::destroyIndex );
connect( mLayer, &QgsVectorLayer::layerModified, this, &QgsPointLocator::destroyIndex );
}


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

connect( mLayer, &QgsVectorLayer::styleChanged, this, &QgsPointLocator::destroyIndex );
destroyIndex();
}

Expand Down Expand Up @@ -740,10 +738,10 @@ bool QgsPointLocator::rebuildIndex( int maxFeaturesToIndex )
if ( !f.hasGeometry() )
continue;

if ( ctx && renderer )
if ( filter && ctx && renderer )
{
ctx->expressionContext().setFeature( f );
if ( filter && !renderer->willRenderFeature( f, *ctx ) )
if ( !renderer->willRenderFeature( f, *ctx ) )
{
continue;
}
Expand Down
1 change: 0 additions & 1 deletion src/core/qgspointlocator.h
Expand Up @@ -285,7 +285,6 @@ class CORE_EXPORT QgsPointLocator : public QObject
//! flag whether the layer is currently empty (i.e. mRTree is null but it is not necessary to rebuild it)
bool mIsEmptyLayer;

QgsFeatureIds mFeatureIds;

//! R-tree containing spatial index
QgsCoordinateTransform mTransform;
Expand Down
1 change: 0 additions & 1 deletion tests/src/core/testqgssnappingutils.cpp
Expand Up @@ -136,7 +136,6 @@ class TestQgsSnappingUtils : public QObject
QVERIFY( !m.hasVertex() );

u.setEnableSnappingForInvisibleFeature( true );
mVL->styleChanged();
m = u.snapToMap( QPoint( 2, 2 ) );
QVERIFY( m.isValid() );
QVERIFY( m.hasVertex() );
Expand Down

0 comments on commit 5e5fdf9

Please sign in to comment.