bug2712fix.diff

patchfix - Charles Timko -, 2010-05-14 02:46 PM

Download (1.45 KB)

View differences:

python/gui/qgsmapcanvas.sip (working copy)
170 170

  
171 171
    //! Zoom out with fixed factor
172 172
    void zoomOut( );
173

  
174
    //! Zoom to a specific scale
175
    void zoomScale( double scale );
173 176
    
174 177
    //! Zoom with the factor supplied. Factor > 1 zooms in
175 178
    void zoomByFactor( double scaleFactor );
src/gui/qgsmapcanvas.h (working copy)
228 228
    //! Zoom out with fixed factor
229 229
    void zoomOut( );
230 230

  
231
    //! Zoom to a specific scale
232
    void zoomScale( double scale );
233

  
231 234
    //! Zoom with the factor supplied. Factor > 1 zooms out, interval (0,1) zooms in
232 235
    void zoomByFactor( double scaleFactor );
233 236

  
src/gui/qgsmapcanvas.cpp (working copy)
1432 1432
  refresh();
1433 1433
}
1434 1434

  
1435

  
1436
void QgsMapCanvas::zoomScale( double scale )
1437
{
1438
	// Since it is an adjustment of scale, we do:
1439
	double factor = scale / mMapRenderer->scale();
1440
	zoomByFactor( factor );
1441
}
1442

  
1435 1443
void QgsMapCanvas::selectionChangedSlot()
1436 1444
{
1437 1445
  // Find out which layer it was that sent the signal.