diff --git a/src/plugins/grass/qgsgrassplugin.cpp b/src/plugins/grass/qgsgrassplugin.cpp index f8627457e6c..70e8cca7071 100644 --- a/src/plugins/grass/qgsgrassplugin.cpp +++ b/src/plugins/grass/qgsgrassplugin.cpp @@ -151,7 +151,6 @@ void QgsGrassPlugin::initGui() // Create region rubber band mRegionBand = new QgsRubberBand(mCanvas, 1); mRegionBand->setZ(20); - mRegionBand->hide(); // Create the action for tool mOpenMapsetAction = new QAction( tr("Open mapset"), this ); @@ -241,7 +240,7 @@ void QgsGrassPlugin::mapsetChanged () mOpenToolsAction->setEnabled(false); mRegionAction->setEnabled(false); mEditRegionAction->setEnabled(false); - mRegionBand->hide(); + mRegionBand->reset(); mCloseMapsetAction->setEnabled(false); mNewVectorAction->setEnabled(false); @@ -261,9 +260,7 @@ void QgsGrassPlugin::mapsetChanged () QSettings settings("QuantumGIS", "qgis"); bool on = settings.readBoolEntry ("/GRASS/region/on", true ); mRegionAction->setOn(on); - if ( on ) { - mRegionBand->show(); - } + switchRegion(on); if ( mTools ) { @@ -613,9 +610,8 @@ void QgsGrassPlugin::switchRegion(bool on) if ( on ) { displayRegion(); - mRegionBand->show(); } else { - mRegionBand->hide(); + mRegionBand->reset(); } }