Skip to content

Commit 7d0dcbd

Browse files
author
timlinux
committed
use isVisible() rather than visible() to test for layer visibility
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@9232 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 864a224 commit 7d0dcbd

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

python/gui/qgsmapcanvas.sip

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public:
1616
void setVisible(bool visible);
1717
void setInOverview(bool inOverview);
1818

19-
bool visible() const;
19+
bool isVisible() const;
2020
bool inOverview() const;
2121

2222
QgsMapLayer* layer();

src/app/legend/qgslegendlayerfile.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ void QgsLegendLayerFile::setVisible( bool visible )
186186

187187
bool QgsLegendLayerFile::isVisible()
188188
{
189-
return mLyr.visible();
189+
return mLyr.isVisible();
190190
}
191191

192192
void QgsLegendLayerFile::setInOverview( bool inOverview )

src/app/qgsmapserverexport.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ void QgsMapserverExport::writeMapFile()
238238
mapFile << " STATUS ";
239239

240240
// TODO: what to do with visibility
241-
//if (lyr->visible())
241+
//if (lyr->isVisible())
242242
//{
243243
mapFile << "ON";
244244
//} else

src/gui/qgsmapcanvas.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ void QgsMapCanvas::setLayerSet( QList<QgsMapCanvasLayer>& layers )
232232
for ( i = 0; i < layers.size(); i++ )
233233
{
234234
QgsMapCanvasLayer& lyr = layers[i];
235-
if ( lyr.visible() )
235+
if ( lyr.isVisible() )
236236
{
237237
layerSet.push_back( lyr.layer()->getLayerID() );
238238
}

src/gui/qgsmapcanvas.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class GUI_EXPORT QgsMapCanvasLayer
6969
void setVisible( bool visible ) { mVisible = visible; }
7070
void setInOverview( bool inOverview ) { mInOverview = inOverview; }
7171

72-
bool visible() const { return mVisible; }
72+
bool isVisible() const { return mVisible; }
7373
bool inOverview() const { return mInOverview; }
7474

7575
QgsMapLayer* layer() { return mLayer; }

tools/mapserver_export/qgsmapserverexport.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ void QgsMapserverExport::writeMapFile()
363363
#endif
364364
// set visibility (STATUS)
365365
mapFile << " STATUS ";
366-
if (lyr->visible())
366+
if (lyr->isVisible())
367367
{
368368
mapFile << "ON";
369369
} else

0 commit comments

Comments
 (0)