Skip to content
Permalink
Browse files
Fixed a crash (clicking zoom to layer with no active layer)
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15588 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Mar 23, 2011
1 parent a35ef61 commit 2cddedfee93b4fd5e8507ebfbdc4dc75c74a6f82
Showing with 5 additions and 0 deletions.
  1. +3 −0 src/app/legend/qgslegend.cpp
  2. +2 −0 src/app/qgisapp.cpp
@@ -1719,6 +1719,9 @@ void QgsLegend::legendLayerZoom()

QgsLegendItem* li = dynamic_cast<QgsLegendItem *>( currentItem() );

if ( !li )
return;

if ( li->type() == QgsLegendItem::LEGEND_LAYER )
{
QgsLegendLayer* currentLayer = dynamic_cast<QgsLegendLayer *>( currentItem() );
@@ -5790,11 +5790,13 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer* layer )
mActionLocalHistogramStretch->setEnabled( false );
mActionFullHistogramStretch->setEnabled( false );
mActionZoomActualSize->setEnabled( false );
mActionZoomToLayer->setEnabled( false );
return;
}

mActionLayerProperties->setEnabled( true );
mActionAddToOverview->setEnabled( true );
mActionZoomToLayer->setEnabled( true );

/***********Vector layers****************/
if ( layer->type() == QgsMapLayer::VectorLayer )

0 comments on commit 2cddedf

Please sign in to comment.