[QGIS Commit] r10812 - trunk/qgis/src/plugins/grass

svn_qgis at osgeo.org svn_qgis at osgeo.org
Mon May 18 05:34:09 EDT 2009


Author: rblazek
Date: 2009-05-18 05:34:09 -0400 (Mon, 18 May 2009)
New Revision: 10812

Modified:
   trunk/qgis/src/plugins/grass/qgsgrassmodule.cpp
Log:
fix for ticket #1617, wrong maps associated with combobox after update (added layer)

Modified: trunk/qgis/src/plugins/grass/qgsgrassmodule.cpp
===================================================================
--- trunk/qgis/src/plugins/grass/qgsgrassmodule.cpp	2009-05-18 09:27:12 UTC (rev 10811)
+++ trunk/qgis/src/plugins/grass/qgsgrassmodule.cpp	2009-05-18 09:34:09 UTC (rev 10812)
@@ -2317,7 +2317,7 @@
                       + " " + grassLayer + " " + type + " )";
 
       mLayerComboBox->addItem( label );
-      if ( label == current ) mLayerComboBox->setItemText( mLayerComboBox->currentIndex(), current );
+      if ( label == current ) mLayerComboBox->setCurrentIndex ( mLayerComboBox->count()-1 );
 
       mMapLayers.push_back( vector );
       mVectorLayerNames.push_back( grassLayer );
@@ -2366,7 +2366,7 @@
       QString label = layer->name() + " ( " + map + "@" + mapset + " )";
 
       mLayerComboBox->addItem( label );
-      if ( label == current ) mLayerComboBox->setItemText( mLayerComboBox->currentIndex(), current );
+      if ( label == current ) mLayerComboBox->setCurrentIndex ( mLayerComboBox->count()-1 );
     }
   }
 }



More information about the QGIS-commit mailing list