Skip to content

Commit 65b5764

Browse files
author
wonder
committed
Fixed ticket #287 - updating GRASS region
git-svn-id: http://svn.osgeo.org/qgis/trunk@5941 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent f1faa61 commit 65b5764

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/plugins/grass/qgsgrassplugin.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ void QgsGrassPlugin::initGui()
151151
// Create region rubber band
152152
mRegionBand = new QgsRubberBand(mCanvas, 1);
153153
mRegionBand->setZ(20);
154-
mRegionBand->hide();
155154

156155
// Create the action for tool
157156
mOpenMapsetAction = new QAction( tr("Open mapset"), this );
@@ -241,7 +240,7 @@ void QgsGrassPlugin::mapsetChanged ()
241240
mOpenToolsAction->setEnabled(false);
242241
mRegionAction->setEnabled(false);
243242
mEditRegionAction->setEnabled(false);
244-
mRegionBand->hide();
243+
mRegionBand->reset();
245244
mCloseMapsetAction->setEnabled(false);
246245
mNewVectorAction->setEnabled(false);
247246

@@ -261,9 +260,7 @@ void QgsGrassPlugin::mapsetChanged ()
261260
QSettings settings("QuantumGIS", "qgis");
262261
bool on = settings.readBoolEntry ("/GRASS/region/on", true );
263262
mRegionAction->setOn(on);
264-
if ( on ) {
265-
mRegionBand->show();
266-
}
263+
switchRegion(on);
267264

268265
if ( mTools )
269266
{
@@ -613,9 +610,8 @@ void QgsGrassPlugin::switchRegion(bool on)
613610

614611
if ( on ) {
615612
displayRegion();
616-
mRegionBand->show();
617613
} else {
618-
mRegionBand->hide();
614+
mRegionBand->reset();
619615
}
620616
}
621617

0 commit comments

Comments
 (0)