Skip to content

Commit

Permalink
Extend extent history to 100 entries
Browse files Browse the repository at this point in the history
  • Loading branch information
uclaros authored and nyalldawson committed Sep 19, 2020
1 parent ae67b9e commit bc6ed95
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/gui/qgsmapcanvas.cpp
Expand Up @@ -1090,8 +1090,6 @@ void QgsMapCanvas::setExtent( const QgsRectangle &r, bool magnified )
}
emit extentsChanged();
updateScale();
if ( mLastExtent.size() > 20 )
mLastExtent.removeAt( 0 );

//clear all extent items after current index
for ( int i = mLastExtent.size() - 1; i > mLastExtentIndex; i-- )
Expand All @@ -1101,8 +1099,8 @@ void QgsMapCanvas::setExtent( const QgsRectangle &r, bool magnified )

mLastExtent.append( extent() );

// adjust history to no more than 20
if ( mLastExtent.size() > 20 )
// adjust history to no more than 100
if ( mLastExtent.size() > 100 )
{
mLastExtent.removeAt( 0 );
}
Expand Down

0 comments on commit bc6ed95

Please sign in to comment.