Skip to content

Commit

Permalink
Improve incremental WFS fetch. Patch from Bill Clay from ticket 4604
Browse files Browse the repository at this point in the history
  • Loading branch information
mhugent authored and alexbruy committed Jan 28, 2012
1 parent ad8cb27 commit f8a6359
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
Original file line number Diff line number Diff line change
Expand Up @@ -2462,7 +2462,6 @@ void QgisApp::addWfsLayer()
return;
}

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

// TODO: QDialog for now, switch to QWidget in future
Expand All @@ -2475,7 +2474,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 @@ -6832,7 +6836,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
Original file line number Diff line number Diff line change
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
Loading

0 comments on commit f8a6359

Please sign in to comment.