Skip to content
Permalink
Browse files

[app] Don't trigger repaint twice

  • Loading branch information
elpaso committed Nov 21, 2017
1 parent 17ca25f commit 9866b2402b18c021601a97fa2408c371044aba20
Showing with 5 additions and 11 deletions.
  1. +5 −11 src/app/qgisapp.cpp
@@ -8934,19 +8934,13 @@ void QgisApp::layerSubsetString()
// Set the sql in the query builder to the same in the prop dialog
// (in case the user has already changed it)
qb->setSql( vlayer->subsetString() );
// Open the query builder
if ( qb->exec() )
// Open the query builder and refresh symbology if sql has changed
// Note: repaintRequested is emitted directly from QgsQueryBuilder
// when the sql is set in the layer.
if ( qb->exec() && ( subsetBefore != qb->sql() ) && mLayerTreeView )
{
if ( subsetBefore != qb->sql() )
{
vlayer->triggerRepaint();
if ( mLayerTreeView )
{
mLayerTreeView->refreshLayerSymbology( vlayer->id() );
}
}
mLayerTreeView->refreshLayerSymbology( vlayer->id() );
}

}

void QgisApp::saveLastMousePosition( const QgsPointXY &p )

0 comments on commit 9866b24

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