Skip to content

Commit

Permalink
make QgsMapCanvas::updateCanvasItemPositions a protected slot
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Jun 15, 2017
1 parent 40e5dda commit ae6ad5c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
11 changes: 6 additions & 5 deletions python/gui/qgsmapcanvas.sip
Expand Up @@ -851,16 +851,17 @@ Overridden drag enter event
called when panning is in action, reset indicates end of panning
%End

void updateCanvasItemPositions();
%Docstring
called on resize or changed extent to notify canvas items to change their rectangle
%End



void updateDatumTransformEntries();
%Docstring
Make sure the datum transform store is properly populated
%End

protected slots:
void updateCanvasItemPositions();
%Docstring
called on resize or changed extent to notify canvas items to change their rectangle
%End

}; // class QgsMapCanvas
Expand Down
5 changes: 0 additions & 5 deletions src/gui/qgsmapcanvas.cpp
Expand Up @@ -867,8 +867,6 @@ void QgsMapCanvas::zoomToPreviousExtent()
// update controls' enabled state
emit zoomLastStatusChanged( mLastExtentIndex > 0 );
emit zoomNextStatusChanged( mLastExtentIndex < mLastExtent.size() - 1 );
// notify canvas items of change
updateCanvasItemPositions();
}

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

moveCanvasContents( true );

// notify canvas items of change
updateCanvasItemPositions();

updateScale();

//refresh();
Expand Down
7 changes: 4 additions & 3 deletions src/gui/qgsmapcanvas.h
Expand Up @@ -716,9 +716,6 @@ class GUI_EXPORT QgsMapCanvas : public QGraphicsView
//! called when panning is in action, reset indicates end of panning
void moveCanvasContents( bool reset = false );

//! called on resize or changed extent to notify canvas items to change their rectangle
void updateCanvasItemPositions();

/// implementation struct
class CanvasProperties;

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

protected slots:
//! called on resize or changed extent to notify canvas items to change their rectangle
void updateCanvasItemPositions();

private slots:

void layerRepaintRequested( bool deferred );
Expand Down

0 comments on commit ae6ad5c

Please sign in to comment.