Skip to content
Permalink
Browse files

fix martin's review

  • Loading branch information
lbartoletti committed Apr 24, 2018
1 parent 66b0e59 commit 5e5fdf948979a87dcab85eda50dd8415e9f1bef1
@@ -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();

@@ -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 );
}


@@ -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();
}

@@ -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;
}
@@ -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;
@@ -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() );

0 comments on commit 5e5fdf9

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