Skip to content

Commit 9037eb5

Browse files
author
timlinux
committed
Dont pan if next point is in current extent (so we can take advantage of render caching
git-svn-id: http://svn.osgeo.org/qgis/trunk@11911 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent a2edffb commit 9037eb5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/plugins/evis/eventbrowser/evisgenericeventbrowsergui.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,11 @@ void eVisGenericEventBrowserGui::displayImage( )
540540
//keep the extent the same just center the map canvas in the display so our feature is in the middle
541541
QgsRectangle myRect( myPoint.x( ) - ( mCanvas->extent( ).width( ) / 2 ), myPoint.y( ) - ( mCanvas->extent( ).height( ) / 2 ), myPoint.x( ) + ( mCanvas->extent( ).width( ) / 2 ), myPoint.y( ) + ( mCanvas->extent( ).height( ) / 2 ) );
542542

543-
mCanvas->setExtent( myRect );
543+
// only change the extents if the point is beyond the current extents to minimise repaints
544+
if ( !mCanvas->extent().contains( myPoint ) )
545+
{
546+
mCanvas->setExtent( myRect );
547+
}
544548
mCanvas->refresh( );
545549
}
546550
}

0 commit comments

Comments
 (0)