Skip to content

Commit 738b7e3

Browse files
committed
Ensure progress dialogue shows for WFS GML requests - especially in the case that the geometry type is not determined from the server describe feature type request and we need to inspect the featuretype first feature
1 parent 0210b72 commit 738b7e3

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/core/qgsgml.cpp

+10-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,16 @@ int QgsGml::getFeatures( const QString& uri, QGis::WkbType* wkbType, QgsRectangl
8585

8686
//find out if there is a QGIS main window. If yes, display a progress dialog
8787
QProgressDialog* progressDialog = 0;
88-
QWidget* mainWindow = qApp->activeWindow();
88+
QWidget* mainWindow = 0;
89+
QWidgetList topLevelWidgets = qApp->topLevelWidgets();
90+
for ( QWidgetList::iterator it = topLevelWidgets.begin(); it != topLevelWidgets.end(); ++it )
91+
{
92+
if (( *it )->objectName() == "QgisApp" )
93+
{
94+
mainWindow = *it;
95+
break;
96+
}
97+
}
8998
if ( mainWindow )
9099
{
91100
progressDialog = new QProgressDialog( tr( "Loading GML data\n%1" ).arg( mTypeName ), tr( "Abort" ), 0, 0, mainWindow );

0 commit comments

Comments
 (0)