Skip to content
Permalink
Browse files

Close Data Source Manager if child widget is closed

  • Loading branch information
gacarrillor committed Jul 20, 2017
1 parent 2a572be commit a231f1625a6cd36b60e7590e2465500e84887f0e
Showing with 11 additions and 0 deletions.
  1. +8 −0 src/gui/qgsdatasourcemanagerdialog.cpp
  2. +3 −0 src/gui/qgsdatasourcemanagerdialog.h
@@ -60,6 +60,7 @@ QgsDataSourceManagerDialog::QgsDataSourceManagerDialog( QWidget *parent, QgsMapC
ogrItem->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionAddOgrLayer.svg" ) ) );
ogrItem->setToolTip( tr( "Add Vector layer" ) );
connect( ovl, &QgsOpenVectorLayerDialog::addVectorLayers, this, &QgsDataSourceManagerDialog::vectorLayersAdded );
connect( ovl, &QgsOpenVectorLayerDialog::rejected, this, &QgsDataSourceManagerDialog::reject );
mPageNames.append( QStringLiteral( "ogr" ) );

// RASTER (forward to app)
@@ -187,6 +188,7 @@ QgsAbstractDataSourceWidget *QgsDataSourceManagerDialog::providerDialog( const Q
{
dlg->setMapCanvas( mMapCanvas );
}
connect( dlg, &QgsAbstractDataSourceWidget::rejected, this, &QgsDataSourceManagerDialog::reject );
return dlg;
}
}
@@ -229,3 +231,9 @@ void QgsDataSourceManagerDialog::addVectorProviderDialog( const QString provider
connect( this, SIGNAL( providerDialogsRefreshRequested() ), dlg, SLOT( refresh() ) );
}
}

void QgsDataSourceManagerDialog::showEvent( QShowEvent *e )
{
ui->mOptionsStackedWidget->currentWidget()->show();
QDialog::showEvent( e );
}
@@ -78,6 +78,9 @@ class GUI_EXPORT QgsDataSourceManagerDialog : public QgsOptionsDialogBase, priva
//! Refresh the browser view
void refresh();

protected:
virtual void showEvent( QShowEvent *event ) override;

signals:
//! Emitted when a raster layer was selected for addition: for signal forwarding to QgisApp
void addRasterLayer( const QString &uri, const QString &baseName, const QString &providerKey );

0 comments on commit a231f16

Please sign in to comment.
You can’t perform that action at this time.