Skip to content

Commit

Permalink
use isVisible() rather than visible() to test for layer visibility
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@9232 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Aug 31, 2008
1 parent 864a224 commit 7d0dcbd
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion python/gui/qgsmapcanvas.sip
Expand Up @@ -16,7 +16,7 @@ public:
void setVisible(bool visible);
void setInOverview(bool inOverview);

bool visible() const;
bool isVisible() const;
bool inOverview() const;

QgsMapLayer* layer();
Expand Down
2 changes: 1 addition & 1 deletion src/app/legend/qgslegendlayerfile.cpp
Expand Up @@ -186,7 +186,7 @@ void QgsLegendLayerFile::setVisible( bool visible )

bool QgsLegendLayerFile::isVisible()
{
return mLyr.visible();
return mLyr.isVisible();
}

void QgsLegendLayerFile::setInOverview( bool inOverview )
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsmapserverexport.cpp
Expand Up @@ -238,7 +238,7 @@ void QgsMapserverExport::writeMapFile()
mapFile << " STATUS ";

// TODO: what to do with visibility
//if (lyr->visible())
//if (lyr->isVisible())
//{
mapFile << "ON";
//} else
Expand Down
2 changes: 1 addition & 1 deletion src/gui/qgsmapcanvas.cpp
Expand Up @@ -232,7 +232,7 @@ void QgsMapCanvas::setLayerSet( QList<QgsMapCanvasLayer>& layers )
for ( i = 0; i < layers.size(); i++ )
{
QgsMapCanvasLayer& lyr = layers[i];
if ( lyr.visible() )
if ( lyr.isVisible() )
{
layerSet.push_back( lyr.layer()->getLayerID() );
}
Expand Down
2 changes: 1 addition & 1 deletion src/gui/qgsmapcanvas.h
Expand Up @@ -69,7 +69,7 @@ class GUI_EXPORT QgsMapCanvasLayer
void setVisible( bool visible ) { mVisible = visible; }
void setInOverview( bool inOverview ) { mInOverview = inOverview; }

bool visible() const { return mVisible; }
bool isVisible() const { return mVisible; }
bool inOverview() const { return mInOverview; }

QgsMapLayer* layer() { return mLayer; }
Expand Down
2 changes: 1 addition & 1 deletion tools/mapserver_export/qgsmapserverexport.cpp
Expand Up @@ -363,7 +363,7 @@ void QgsMapserverExport::writeMapFile()
#endif
// set visibility (STATUS)
mapFile << " STATUS ";
if (lyr->visible())
if (lyr->isVisible())
{
mapFile << "ON";
} else
Expand Down

0 comments on commit 7d0dcbd

Please sign in to comment.