Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Improve incremental WFS fetch. Patch from Bill Clay from ticket 4604
  • Loading branch information
mhugent committed Dec 27, 2011
1 parent 137a031 commit 9957ee5
Show file tree
Hide file tree
Showing 7 changed files with 275 additions and 123 deletions.
10 changes: 7 additions & 3 deletions src/app/qgisapp.cpp
Expand Up @@ -2471,7 +2471,6 @@ void QgisApp::addWfsLayer()
return;
}

// Fudge for now
QgsDebugMsg( "about to addWfsLayer" );

// TODO: QDialog for now, switch to QWidget in future
Expand All @@ -2484,7 +2483,12 @@ void QgisApp::addWfsLayer()
connect( wfss , SIGNAL( addWfsLayer( QString, QString ) ),
this , SLOT( addWfsLayer( QString, QString ) ) );

wfss->setProperty( "MapExtent", mMapCanvas->extent().toString() ); //hack to reenable wfs with extent setting
//reenable wfs with extent setting: pass canvas info to source select
wfss->setProperty( "MapExtent", mMapCanvas->extent().toString() );
if ( mMapCanvas->mapRenderer()->hasCrsTransformEnabled() )
{ //if "on the fly" reprojection is active, pass canvas CRS
wfss->setProperty( "MapCRS", mMapCanvas->mapRenderer()->destinationCrs().authid() );
}

bool bkRenderFlag = mMapCanvas->renderFlag();
mMapCanvas->setRenderFlag( false );
Expand Down Expand Up @@ -7146,7 +7150,7 @@ QMenu* QgisApp::createPopupMenu()
QList< QAction* > al = menu->actions();
QList< QAction* > panels, toolbars;

if( !al.isEmpty() )
if ( !al.isEmpty() )
{
bool found = false;
for ( int i = 0; i < al.size(); ++i )
Expand Down
2 changes: 1 addition & 1 deletion src/providers/wfs/qgswfsdata.cpp
Expand Up @@ -101,7 +101,7 @@ int QgsWFSData::getWFSData()

if ( mainWindow )
{
progressDialog = new QProgressDialog( tr( "Loading WFS data" ), tr( "Abort" ), 0, 0, mainWindow );
progressDialog = new QProgressDialog( tr( "Loading WFS data\n%1" ).arg( mTypeName ), tr( "Abort" ), 0, 0, mainWindow );
progressDialog->setWindowModality( Qt::ApplicationModal );
connect( this, SIGNAL( dataReadProgress( int ) ), progressDialog, SLOT( setValue( int ) ) );
connect( this, SIGNAL( totalStepsUpdate( int ) ), progressDialog, SLOT( setMaximum( int ) ) );
Expand Down

0 comments on commit 9957ee5

Please sign in to comment.