Skip to content

Commit

Permalink
don't close wms layer dialog after addition and allow naming of layers
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@11528 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Aug 30, 2009
1 parent 2e88599 commit 2ab5702
Show file tree
Hide file tree
Showing 4 changed files with 191 additions and 182 deletions.
13 changes: 1 addition & 12 deletions src/app/qgisapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2778,18 +2778,7 @@ void QgisApp::addWmsLayer()
QgsDebugMsg( "about to addRasterLayer" );

QgsServerSourceSelect *wmss = new QgsServerSourceSelect( this );

if ( wmss->exec() )
{

addRasterLayer( wmss->connectionInfo(),
/*wmss->connName()*/wmss->selectedLayers().join( "/" ),
"wms",
wmss->selectedLayers(),
wmss->selectedStylesForSelectedLayers(),
wmss->selectedImageEncoding(),
wmss->selectedCrs() );
}
wmss->exec();
}


Expand Down
9 changes: 8 additions & 1 deletion src/app/qgsserversourceselect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,14 @@ void QgsServerSourceSelect::on_btnAdd_clicked()
}
else
{
accept();
QgisApp::instance()->addRasterLayer(
connectionInfo(),
leLayerName->text().isEmpty() ? selectedLayers().join( "/" ) : leLayerName->text(),
"wms",
selectedLayers(),
selectedStylesForSelectedLayers(),
selectedImageEncoding(),
selectedCrs() );
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsserversourceselect.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class QgsServerSourceSelect : public QDialog, private Ui::QgsServerSourceSelectB
*/
void on_btnConnect_clicked();

//! Determines the layers the user selected and closes the dialog
//! Determines the layers the user selected
void on_btnAdd_clicked();

//! Opens the Spatial Reference System dialog.
Expand Down
Loading

0 comments on commit 2ab5702

Please sign in to comment.