Showing with 7 additions and 11 deletions.
  1. +0 −6 src/app/legend/qgslegend.cpp
  2. +0 −3 src/app/legend/qgslegend.h
  3. +0 −1 src/app/legend/qgslegendlayer.cpp
  4. +1 −1 src/core/qgsmapsettings.cpp
  5. +6 −0 src/gui/qgsmapoverviewcanvas.cpp
6 changes: 0 additions & 6 deletions src/app/legend/qgslegend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2445,11 +2445,6 @@ void QgsLegend::updateMapCanvasLayerSet()
mMapCanvas->setLayerSet( layers );
}

void QgsLegend::updateOverview()
{
mMapCanvas->updateOverview();
}

void QgsLegend::enableOverviewModeAllLayers( bool isInOverview )
{
for ( QTreeWidgetItem* theItem = firstItem(); theItem; theItem = nextItem( theItem ) )
Expand All @@ -2462,7 +2457,6 @@ void QgsLegend::enableOverviewModeAllLayers( bool isInOverview )

}
updateMapCanvasLayerSet();
updateOverview();
}

QStringList QgsLegend::layerIDs()
Expand Down
3 changes: 0 additions & 3 deletions src/app/legend/qgslegend.h
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,6 @@ class QgsLegend : public QTreeWidget
/**Updates layer set of map canvas*/
void updateMapCanvasLayerSet();

/**Updates overview*/
void updateOverview();

/**Show/remove all layer in/from overview*/
void enableOverviewModeAllLayers( bool isInOverview );

Expand Down
1 change: 0 additions & 1 deletion src/app/legend/qgslegendlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,6 @@ void QgsLegendLayer::showInOverview()
setInOverview( ! isInOverview() );

legend()->updateMapCanvasLayerSet();
legend()->updateOverview();
}

QString QgsLegendLayer::nameFromLayer( QgsMapLayer* layer )
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsmapsettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ void QgsMapSettings::updateDerived()
{
QgsRectangle extent = mExtent;

if ( extent.isEmpty() )
if ( extent.isEmpty() || !extent.isFinite() )
{
mValid = false;
return;
Expand Down
6 changes: 6 additions & 0 deletions src/gui/qgsmapoverviewcanvas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,14 @@ void QgsMapOverviewCanvas::updatePanningWidget( const QPoint& pos )

void QgsMapOverviewCanvas::refresh()
{
updateFullExtent();

if ( !mSettings.hasValidSettings() )
{
mPixmap = QPixmap();
update();
return; // makes no sense to render anything
}

if ( mJob )
{
Expand Down