Skip to content
Permalink
Browse files

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
  • Loading branch information
timlinux
timlinux committed Nov 3, 2009
1 parent a2edffb commit 9037eb5a8f0c276e04f136b2468b1bc550a1b3eb
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/plugins/evis/eventbrowser/evisgenericeventbrowsergui.cpp
@@ -540,7 +540,11 @@ void eVisGenericEventBrowserGui::displayImage( )
//keep the extent the same just center the map canvas in the display so our feature is in the middle
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 ) );

mCanvas->setExtent( myRect );
// only change the extents if the point is beyond the current extents to minimise repaints
if ( !mCanvas->extent().contains( myPoint ) )
{
mCanvas->setExtent( myRect );
}
mCanvas->refresh( );
}
}

0 comments on commit 9037eb5

Please sign in to comment.
You can’t perform that action at this time.