Skip to content

Commit 50b4e2b

Browse files
author
jef
committed
don't close wms layer dialog after addition and allow naming of layers
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@11528 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 81c44fd commit 50b4e2b

File tree

4 files changed

+191
-182
lines changed

4 files changed

+191
-182
lines changed

src/app/qgisapp.cpp

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2778,18 +2778,7 @@ void QgisApp::addWmsLayer()
27782778
QgsDebugMsg( "about to addRasterLayer" );
27792779

27802780
QgsServerSourceSelect *wmss = new QgsServerSourceSelect( this );
2781-
2782-
if ( wmss->exec() )
2783-
{
2784-
2785-
addRasterLayer( wmss->connectionInfo(),
2786-
/*wmss->connName()*/wmss->selectedLayers().join( "/" ),
2787-
"wms",
2788-
wmss->selectedLayers(),
2789-
wmss->selectedStylesForSelectedLayers(),
2790-
wmss->selectedImageEncoding(),
2791-
wmss->selectedCrs() );
2792-
}
2781+
wmss->exec();
27932782
}
27942783

27952784

src/app/qgsserversourceselect.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,14 @@ void QgsServerSourceSelect::on_btnAdd_clicked()
439439
}
440440
else
441441
{
442-
accept();
442+
QgisApp::instance()->addRasterLayer(
443+
connectionInfo(),
444+
leLayerName->text().isEmpty() ? selectedLayers().join( "/" ) : leLayerName->text(),
445+
"wms",
446+
selectedLayers(),
447+
selectedStylesForSelectedLayers(),
448+
selectedImageEncoding(),
449+
selectedCrs() );
443450
}
444451
}
445452

src/app/qgsserversourceselect.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ class QgsServerSourceSelect : public QDialog, private Ui::QgsServerSourceSelectB
102102
*/
103103
void on_btnConnect_clicked();
104104

105-
//! Determines the layers the user selected and closes the dialog
105+
//! Determines the layers the user selected
106106
void on_btnAdd_clicked();
107107

108108
//! Opens the Spatial Reference System dialog.

0 commit comments

Comments
 (0)