Skip to content

Commit

Permalink
Ensure progress dialogue shows for WFS GML requests - especially in t…
Browse files Browse the repository at this point in the history
…he case that the geometry type is not determined from the server describe feature type request and we need to inspect the featuretype first feature
  • Loading branch information
palmerj committed Jul 14, 2013
1 parent 0210b72 commit 738b7e3
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/core/qgsgml.cpp
Expand Up @@ -85,7 +85,16 @@ int QgsGml::getFeatures( const QString& uri, QGis::WkbType* wkbType, QgsRectangl

//find out if there is a QGIS main window. If yes, display a progress dialog
QProgressDialog* progressDialog = 0;
QWidget* mainWindow = qApp->activeWindow();
QWidget* mainWindow = 0;
QWidgetList topLevelWidgets = qApp->topLevelWidgets();
for ( QWidgetList::iterator it = topLevelWidgets.begin(); it != topLevelWidgets.end(); ++it )
{
if (( *it )->objectName() == "QgisApp" )
{
mainWindow = *it;
break;
}
}
if ( mainWindow )
{
progressDialog = new QProgressDialog( tr( "Loading GML data\n%1" ).arg( mTypeName ), tr( "Abort" ), 0, 0, mainWindow );
Expand Down

0 comments on commit 738b7e3

Please sign in to comment.