Skip to content
Permalink
Browse files
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
  • Loading branch information
timlinux committed Aug 31, 2008
1 parent 864a224 commit 7d0dcbd2a573986b28510b0a4628ea40ed42682a
@@ -16,7 +16,7 @@ public:
void setVisible(bool visible);
void setInOverview(bool inOverview);

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

QgsMapLayer* layer();
@@ -186,7 +186,7 @@ void QgsLegendLayerFile::setVisible( bool visible )

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

void QgsLegendLayerFile::setInOverview( bool inOverview )
@@ -238,7 +238,7 @@ void QgsMapserverExport::writeMapFile()
mapFile << " STATUS ";

// TODO: what to do with visibility
//if (lyr->visible())
//if (lyr->isVisible())
//{
mapFile << "ON";
//} else
@@ -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() );
}
@@ -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; }
@@ -363,7 +363,7 @@ void QgsMapserverExport::writeMapFile()
#endif
// set visibility (STATUS)
mapFile << " STATUS ";
if (lyr->visible())
if (lyr->isVisible())
{
mapFile << "ON";
} else

0 comments on commit 7d0dcbd

Please sign in to comment.