Skip to content

Commit

Permalink
Remaining fix for bug #3459
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@15121 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Feb 2, 2011
1 parent c56527f commit 68bd1e5
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/app/qgisapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4933,16 +4933,22 @@ void QgisApp::layerSubsetString()

// launch the query builder
QgsQueryBuilder *qb = new QgsQueryBuilder( vlayer, this );
QString subsetBefore = vlayer->subsetString();

// 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() )
{
// if the sql is changed, update it in the prop subset text box
vlayer->setSubsetString( qb->sql() );
mMapCanvas->refresh();
if ( subsetBefore != qb->sql() )
{
mMapCanvas->refresh();
if ( mMapLegend )
{
mMapLegend->refreshLayerSymbology( vlayer->getLayerID(), false );
}
}
}

// delete the query builder object
Expand Down

0 comments on commit 68bd1e5

Please sign in to comment.