Skip to content

Commit

Permalink
create dialogs on stack
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Apr 14, 2020
1 parent 3dbcaba commit b9cb2ee
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions src/providers/wms/qgsxyzsourceselect.cpp
Expand Up @@ -44,27 +44,25 @@ QgsXyzSourceSelect::QgsXyzSourceSelect( QWidget *parent, Qt::WindowFlags fl, Qgs

void QgsXyzSourceSelect::btnNew_clicked()
{
QgsXyzConnectionDialog *nc = new QgsXyzConnectionDialog( this );
if ( nc->exec() )
QgsXyzConnectionDialog nc( this );
if ( nc.exec() )
{
QgsXyzConnectionUtils::addConnection( nc->connection() );
QgsXyzConnectionUtils::addConnection( nc.connection() );
populateConnectionList();
emit connectionsChanged();
}
delete nc;
}

void QgsXyzSourceSelect::btnEdit_clicked()
{
QgsXyzConnectionDialog *nc = new QgsXyzConnectionDialog( this );
nc->setConnection( QgsXyzConnectionUtils::connection( cmbConnections->currentText() ) );
if ( nc->exec() )
QgsXyzConnectionDialog nc( this );
nc.setConnection( QgsXyzConnectionUtils::connection( cmbConnections->currentText() ) );
if ( nc.exec() )
{
QgsXyzConnectionUtils::addConnection( nc->connection() );
QgsXyzConnectionUtils::addConnection( nc.connection() );
populateConnectionList();
emit connectionsChanged();
}
delete nc;
}

void QgsXyzSourceSelect::btnDelete_clicked()
Expand Down

0 comments on commit b9cb2ee

Please sign in to comment.