Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
cleanup code: followup d17481e
  • Loading branch information
slarosa committed Mar 28, 2018
1 parent d17481e commit 18f02ee
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions src/gui/qgsquerybuilder.cpp
Expand Up @@ -134,6 +134,7 @@ void QgsQueryBuilder::setupGuiViews()
// Colored rows
lstFields->setAlternatingRowColors( true );
lstValues->setAlternatingRowColors( true );
lstValues->setModel( mProxyValues );
}

void QgsQueryBuilder::fillValues( int idx, int limit )
Expand Down Expand Up @@ -177,14 +178,8 @@ void QgsQueryBuilder::btnSampleValues_clicked()
mLayer->setSubsetString( QLatin1String( "" ) );
}

//delete connection mModelValues and lstValues
QStandardItemModel *tmp = new QStandardItemModel();
lstValues->setModel( tmp );
//Clear and fill the mModelValues
fillValues( mModelFields->data( lstFields->currentIndex(), Qt::UserRole + 1 ).toInt(), 25 );
lstValues->setModel( mProxyValues );
//delete the tmp
delete tmp;

if ( prevSubsetString != mLayer->subsetString() )
{
Expand All @@ -204,14 +199,8 @@ void QgsQueryBuilder::btnGetAllValues_clicked()
mLayer->setSubsetString( QLatin1String( "" ) );
}

//delete connection mModelValues and lstValues
QStandardItemModel *tmp = new QStandardItemModel();
lstValues->setModel( tmp );
//Clear and fill the mModelValues
fillValues( mModelFields->data( lstFields->currentIndex(), Qt::UserRole + 1 ).toInt(), -1 );
lstValues->setModel( mProxyValues );
//delete the tmp
delete tmp;

if ( prevSubsetString != mLayer->subsetString() )
{
Expand Down

0 comments on commit 18f02ee

Please sign in to comment.