Skip to content

Commit

Permalink
Fix for bug where projects loaded slowly
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@8117 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Feb 8, 2008
1 parent e200531 commit bcdcc68
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/app/qgisapp.cpp
Expand Up @@ -2669,6 +2669,7 @@ void QgisApp::fileOpen()
delete openFileDialog;

// clear out any stuff from previous project
mMapCanvas->freeze(true);
removeAllLayers();

QgsProject::instance()->filename( fullPath );
Expand Down Expand Up @@ -2704,6 +2705,9 @@ void QgisApp::fileOpen()
tr("") + "\n" + QString::fromLocal8Bit( e.what() ) );
QgsDebugMsg("BAD LAYERS FOUND");
}

mMapCanvas->freeze(false);
mMapCanvas->refresh();
}

} // QgisApp::fileOpen
Expand Down
5 changes: 4 additions & 1 deletion src/providers/postgres/qgspostgresprovider.cpp
Expand Up @@ -546,7 +546,10 @@ void QgsPostgresProvider::select(QgsAttributeList fetchAttributes,
ready = true;
PQexec(connection, (const char *)(declare.utf8()));

mFeatureQueue.empty();
while(!mFeatureQueue.empty())
{
mFeatureQueue.pop();
}
mFirstFetch = true;
}

Expand Down

0 comments on commit bcdcc68

Please sign in to comment.