Skip to content

Commit

Permalink
Fixed SIP errors and reinstated expand() as depreceated.
Browse files Browse the repository at this point in the history
  • Loading branch information
homann committed Aug 17, 2012
1 parent 6fd2dcc commit 8e16c8e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion python/core/core.sip
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
%Include qgsrastershaderfunction.sip
%Include qgsrastertransparency.sip
%Include qgsrasterviewport.sip
%Include qgsrect.sip
%Include qgsrectangle.sip
%Include qgsrendercontext.sip
%Include qgsrenderer.sip
%Include qgsrunprocess.sip
Expand Down
3 changes: 2 additions & 1 deletion python/core/qgsrect.sip → python/core/qgsrectangle.sip
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ class QgsRectangle
//! Scale the rectangle around its center point
void scale(double, const QgsPoint *c =0);
//! Expand the rectangle to support zoom out scaling
void expand(double, const QgsPoint *c = 0);
// @depreceated use scale instead
void expand(double, const QgsPoint *c = 0) /Depreceated/;
//! return the intersection with the given rectangle
QgsRectangle intersect(const QgsRectangle *rect);
//! returns true when rectangle intersects with other rectangle
Expand Down
3 changes: 2 additions & 1 deletion src/core/qgsrectangle.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ class CORE_EXPORT QgsRectangle
//! Center point of the rectangle
QgsPoint center() const;
//! Scale the rectangle around its center point
void scale( double, const QgsPoint *c = 0 );
void scale( double scaleFactor, const QgsPoint *c = 0 );
Q_DECL_DEPRECATED void expand( double scaleFactor, const QgsPoint *c = 0 ) { return scale( scaleFactor * 2.0, c ); }
//! return the intersection with the given rectangle
QgsRectangle intersect( const QgsRectangle *rect ) const;
//! returns true when rectangle intersects with other rectangle
Expand Down
2 changes: 1 addition & 1 deletion src/gui/qgsmaptoolzoom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ void QgsMapToolZoom::canvasReleaseEvent( QMouseEvent * e )
{
sf = extent.height() / r.height();
}
sf = sf / 2.0;
sf = sf * 2.0;
r.scale( sf );

QgsDebugMsg( QString( "Extent scaled by %1 to %2" ).arg( sf ).arg( r.toString().toLocal8Bit().constData() ) );
Expand Down

0 comments on commit 8e16c8e

Please sign in to comment.