Skip to content

Commit 53732c0

Browse files
author
rblazek
committed
fix for ticket #1617, wrong maps associated with combobox after update (added layer)
git-svn-id: http://svn.osgeo.org/qgis/trunk@10812 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 594b01e commit 53732c0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/plugins/grass/qgsgrassmodule.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -2317,7 +2317,7 @@ void QgsGrassModuleInput::updateQgisLayers()
23172317
+ " " + grassLayer + " " + type + " )";
23182318

23192319
mLayerComboBox->addItem( label );
2320-
if ( label == current ) mLayerComboBox->setItemText( mLayerComboBox->currentIndex(), current );
2320+
if ( label == current ) mLayerComboBox->setCurrentIndex ( mLayerComboBox->count()-1 );
23212321

23222322
mMapLayers.push_back( vector );
23232323
mVectorLayerNames.push_back( grassLayer );
@@ -2366,7 +2366,7 @@ void QgsGrassModuleInput::updateQgisLayers()
23662366
QString label = layer->name() + " ( " + map + "@" + mapset + " )";
23672367

23682368
mLayerComboBox->addItem( label );
2369-
if ( label == current ) mLayerComboBox->setItemText( mLayerComboBox->currentIndex(), current );
2369+
if ( label == current ) mLayerComboBox->setCurrentIndex ( mLayerComboBox->count()-1 );
23702370
}
23712371
}
23722372
}

0 commit comments

Comments
 (0)