Skip to content

Commit

Permalink
fix typo in method name
Browse files Browse the repository at this point in the history
rename method but keep old one in Python for API compatibility
  • Loading branch information
3nids committed Jan 31, 2019
1 parent 7a12f11 commit 3d57a93
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
Expand Up @@ -40,11 +40,17 @@ Constructor: does not take ownership of the layer tree nor canvas
QgsLayerTree *rootGroup() const;
QgsMapCanvas *mapCanvas() const;

void setOvervewCanvas( QgsMapOverviewCanvas *overviewCanvas );
void setOverviewCanvas( QgsMapOverviewCanvas *overviewCanvas );
%Docstring
Associates overview canvas with the bridge, so the overview will be updated whenever main canvas is updated

.. versionadded:: 3.0
.. versionadded:: 3.6
%End


void setOvervewCanvas( QgsMapOverviewCanvas *overviewCanvas ); // TODO QGIS 4.0 remove
%MethodCode
sipCpp->setOverviewCanvas( a0 );
%End

QgsMapOverviewCanvas *overviewCanvas() const;
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgisapp.cpp
Expand Up @@ -3734,7 +3734,7 @@ void QgisApp::createOverview()
// add to the Panel submenu
mPanelMenu->addAction( mOverviewDock->toggleViewAction() );

mLayerTreeCanvasBridge->setOvervewCanvas( mOverviewCanvas );
mLayerTreeCanvasBridge->setOverviewCanvas( mOverviewCanvas );
}

void QgisApp::addDockWidget( Qt::DockWidgetArea area, QDockWidget *thepDockWidget )
Expand Down
15 changes: 14 additions & 1 deletion src/gui/layertree/qgslayertreemapcanvasbridge.h
Expand Up @@ -56,11 +56,24 @@ class GUI_EXPORT QgsLayerTreeMapCanvasBridge : public QObject
QgsLayerTree *rootGroup() const { return mRoot; }
QgsMapCanvas *mapCanvas() const { return mCanvas; }

/**
* Associates overview canvas with the bridge, so the overview will be updated whenever main canvas is updated
* \since QGIS 3.6
*/
void setOverviewCanvas( QgsMapOverviewCanvas *overviewCanvas ) { mOverviewCanvas = overviewCanvas; }

#ifdef SIP_RUN

/**
* Associates overview canvas with the bridge, so the overview will be updated whenever main canvas is updated
* \since QGIS 3.0
* \deprecated use setOverviewCanvas instead
*/
void setOvervewCanvas( QgsMapOverviewCanvas *overviewCanvas ) { mOverviewCanvas = overviewCanvas; }
void setOvervewCanvas( QgsMapOverviewCanvas *overviewCanvas ); // TODO QGIS 4.0 remove
% MethodCode
sipCpp->setOverviewCanvas( a0 );
% End
#endif

/**
* Returns associated overview canvas (may be null)
Expand Down

0 comments on commit 3d57a93

Please sign in to comment.