Skip to content

Commit 75f0e54

Browse files
committed
[addlayerbutton] Pass canvas to the manager (needed by AMS)
1 parent 220d125 commit 75f0e54

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

‎src/app/qgisapp.cpp‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1591,8 +1591,8 @@ void QgisApp::dataSourceManager()
15911591
{
15921592
if ( ! mDataSourceManagerDialog )
15931593
{
1594-
mDataSourceManagerDialog = new QgsDataSourceManagerDialog( this );
1595-
// Forward signals
1594+
mDataSourceManagerDialog = new QgsDataSourceManagerDialog( mapCanvas( ), this );
1595+
// Forward signals to this
15961596
connect( mDataSourceManagerDialog, SIGNAL( addRasterLayer( QString const &, QString const &, QString const & ) ),
15971597
this, SLOT( addRasterLayer( QString const &, QString const &, QString const & ) ) );
15981598
connect( mDataSourceManagerDialog, SIGNAL( addVectorLayer( QString const &, QString const &, QString const & ) ),
@@ -2388,7 +2388,6 @@ void QgisApp::createToolBars()
23882388

23892389
bt = new QToolButton();
23902390
bt->setPopupMode( QToolButton::MenuButtonPopup );
2391-
bt->addAction( mActionDataSourceManager );
23922391
bt->addAction( mActionNewVectorLayer );
23932392
bt->addAction( mActionNewSpatiaLiteLayer );
23942393
bt->addAction( mActionNewGeoPackageLayer );

‎src/app/qgisapp.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,8 +425,8 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
425425
QAction *actionShowBookmarks() { return mActionShowBookmarks; }
426426
QAction *actionDraw() { return mActionDraw; }
427427

428-
QAction *actionNewVectorLayer() { return mActionNewVectorLayer; }
429428
QAction *actionDataSourceManager() { return mActionDataSourceManager; }
429+
QAction *actionNewVectorLayer() { return mActionNewVectorLayer; }
430430
QAction *actionNewSpatialLiteLayer() { return mActionNewSpatiaLiteLayer; }
431431
QAction *actionEmbedLayers() { return mActionEmbedLayers; }
432432
QAction *actionAddOgrLayer() { return mActionAddOgrLayer; }

0 commit comments

Comments
 (0)