Skip to content

Commit bcdcc68

Browse files
author
mhugent
committedFeb 8, 2008
Fix for bug where projects loaded slowly
git-svn-id: http://svn.osgeo.org/qgis/trunk@8117 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent e200531 commit bcdcc68

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed
 

‎src/app/qgisapp.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2669,6 +2669,7 @@ void QgisApp::fileOpen()
26692669
delete openFileDialog;
26702670

26712671
// clear out any stuff from previous project
2672+
mMapCanvas->freeze(true);
26722673
removeAllLayers();
26732674

26742675
QgsProject::instance()->filename( fullPath );
@@ -2704,6 +2705,9 @@ void QgisApp::fileOpen()
27042705
tr("") + "\n" + QString::fromLocal8Bit( e.what() ) );
27052706
QgsDebugMsg("BAD LAYERS FOUND");
27062707
}
2708+
2709+
mMapCanvas->freeze(false);
2710+
mMapCanvas->refresh();
27072711
}
27082712

27092713
} // QgisApp::fileOpen

‎src/providers/postgres/qgspostgresprovider.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,10 @@ void QgsPostgresProvider::select(QgsAttributeList fetchAttributes,
546546
ready = true;
547547
PQexec(connection, (const char *)(declare.utf8()));
548548

549-
mFeatureQueue.empty();
549+
while(!mFeatureQueue.empty())
550+
{
551+
mFeatureQueue.pop();
552+
}
550553
mFirstFetch = true;
551554
}
552555

0 commit comments

Comments
 (0)
Please sign in to comment.