Skip to content

Commit 9a51d89

Browse files
committed
[addlayerbutton] Embedded dialog support
1 parent 75f0e54 commit 9a51d89

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

src/providers/arcgisrest/qgsafssourceselect.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ QgsAfsSourceSelect::QgsAfsSourceSelect( QWidget *parent, Qt::WindowFlags fl, boo
3131
{
3232
if ( embeddedMode )
3333
{
34-
buttonBox->button( QDialogButtonBox::Close )->hide();
34+
buttonBox->removeButton( buttonBox->button( QDialogButtonBox::Close ) );
3535
}
3636

3737
// import/export of connections not supported yet

src/providers/arcgisrest/qgsamssourceselect.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ QgsAmsSourceSelect::QgsAmsSourceSelect( QWidget *parent, Qt::WindowFlags fl, boo
3030
{
3131
if ( embeddedMode )
3232
{
33-
buttonBox->button( QDialogButtonBox::Close )->hide();
33+
buttonBox->removeButton( buttonBox->button( QDialogButtonBox::Close ) );
3434
}
3535

3636
// import/export of connections not supported yet

src/providers/spatialite/qgsspatialitesourceselect.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ QgsSpatiaLiteSourceSelect::QgsSpatiaLiteSourceSelect( QWidget *parent, Qt::Windo
4545
{
4646
setupUi( this );
4747

48+
if ( embeddedMode )
49+
{
50+
buttonBox->removeButton( buttonBox->button( QDialogButtonBox::Close ) );
51+
}
4852

4953
QgsSettings settings;
5054
restoreGeometry( settings.value( QStringLiteral( "Windows/SpatiaLiteSourceSelect/geometry" ) ).toByteArray() );

0 commit comments

Comments
 (0)