Skip to content

Commit ae6ad5c

Browse files
committedJun 15, 2017
make QgsMapCanvas::updateCanvasItemPositions a protected slot
1 parent 40e5dda commit ae6ad5c

File tree

3 files changed

+10
-13
lines changed

3 files changed

+10
-13
lines changed
 

‎python/gui/qgsmapcanvas.sip

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -851,16 +851,17 @@ Overridden drag enter event
851851
called when panning is in action, reset indicates end of panning
852852
%End
853853

854-
void updateCanvasItemPositions();
855-
%Docstring
856-
called on resize or changed extent to notify canvas items to change their rectangle
857-
%End
858-
859854

860855

861856
void updateDatumTransformEntries();
862857
%Docstring
863858
Make sure the datum transform store is properly populated
859+
%End
860+
861+
protected slots:
862+
void updateCanvasItemPositions();
863+
%Docstring
864+
called on resize or changed extent to notify canvas items to change their rectangle
864865
%End
865866

866867
}; // class QgsMapCanvas

‎src/gui/qgsmapcanvas.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -867,8 +867,6 @@ void QgsMapCanvas::zoomToPreviousExtent()
867867
// update controls' enabled state
868868
emit zoomLastStatusChanged( mLastExtentIndex > 0 );
869869
emit zoomNextStatusChanged( mLastExtentIndex < mLastExtent.size() - 1 );
870-
// notify canvas items of change
871-
updateCanvasItemPositions();
872870
}
873871

874872
} // zoomToPreviousExtent
@@ -1337,9 +1335,6 @@ void QgsMapCanvas::resizeEvent( QResizeEvent *e )
13371335

13381336
moveCanvasContents( true );
13391337

1340-
// notify canvas items of change
1341-
updateCanvasItemPositions();
1342-
13431338
updateScale();
13441339

13451340
//refresh();

‎src/gui/qgsmapcanvas.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -716,9 +716,6 @@ class GUI_EXPORT QgsMapCanvas : public QGraphicsView
716716
//! called when panning is in action, reset indicates end of panning
717717
void moveCanvasContents( bool reset = false );
718718

719-
//! called on resize or changed extent to notify canvas items to change their rectangle
720-
void updateCanvasItemPositions();
721-
722719
/// implementation struct
723720
class CanvasProperties;
724721

@@ -735,6 +732,10 @@ class GUI_EXPORT QgsMapCanvas : public QGraphicsView
735732
//! Make sure the datum transform store is properly populated
736733
void updateDatumTransformEntries();
737734

735+
protected slots:
736+
//! called on resize or changed extent to notify canvas items to change their rectangle
737+
void updateCanvasItemPositions();
738+
738739
private slots:
739740

740741
void layerRepaintRequested( bool deferred );

0 commit comments

Comments
 (0)
Please sign in to comment.