Skip to content
Permalink
Browse files
Don't append duplicate extents to extent history
  • Loading branch information
manisandro authored and nyalldawson committed Nov 1, 2021
1 parent ae55eda commit 08fc696c7672fc85992c9a0655cb1d6f114f11b6
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/gui/qgsmapcanvas.cpp
@@ -1264,7 +1264,10 @@ void QgsMapCanvas::setExtent( const QgsRectangle &r, bool magnified )
mLastExtent.removeAt( i );
}

mLastExtent.append( extent() );
if ( !mLastExtent.isEmpty() && mLastExtent.last() != extent() )
{
mLastExtent.append( extent() );
}

// adjust history to no more than 100
if ( mLastExtent.size() > 100 )

0 comments on commit 08fc696

Please sign in to comment.