Skip to content

Commit

Permalink
[addlayerbutton] Pass canvas to the manager (needed by AMS)
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Jun 2, 2017
1 parent 220d125 commit 75f0e54
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/app/qgisapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1591,8 +1591,8 @@ void QgisApp::dataSourceManager()
{
if ( ! mDataSourceManagerDialog )
{
mDataSourceManagerDialog = new QgsDataSourceManagerDialog( this );
// Forward signals
mDataSourceManagerDialog = new QgsDataSourceManagerDialog( mapCanvas( ), this );
// Forward signals to this
connect( mDataSourceManagerDialog, SIGNAL( addRasterLayer( QString const &, QString const &, QString const & ) ),
this, SLOT( addRasterLayer( QString const &, QString const &, QString const & ) ) );
connect( mDataSourceManagerDialog, SIGNAL( addVectorLayer( QString const &, QString const &, QString const & ) ),
Expand Down Expand Up @@ -2388,7 +2388,6 @@ void QgisApp::createToolBars()

bt = new QToolButton();
bt->setPopupMode( QToolButton::MenuButtonPopup );
bt->addAction( mActionDataSourceManager );
bt->addAction( mActionNewVectorLayer );
bt->addAction( mActionNewSpatiaLiteLayer );
bt->addAction( mActionNewGeoPackageLayer );
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgisapp.h
Original file line number Diff line number Diff line change
Expand Up @@ -425,8 +425,8 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
QAction *actionShowBookmarks() { return mActionShowBookmarks; }
QAction *actionDraw() { return mActionDraw; }

QAction *actionNewVectorLayer() { return mActionNewVectorLayer; }
QAction *actionDataSourceManager() { return mActionDataSourceManager; }
QAction *actionNewVectorLayer() { return mActionNewVectorLayer; }
QAction *actionNewSpatialLiteLayer() { return mActionNewSpatiaLiteLayer; }
QAction *actionEmbedLayers() { return mActionEmbedLayers; }
QAction *actionAddOgrLayer() { return mActionAddOgrLayer; }
Expand Down

0 comments on commit 75f0e54

Please sign in to comment.