[QGIS-trac] Re: [Quantum GIS] #3468: Missing layer in project means
I can't load project at all
Quantum GIS
qgis at qgis.org
Tue Mar 1 02:41:33 EST 2011
#3468: Missing layer in project means I can't load project at all
------------------------------------------------+---------------------------
Reporter: arencambre | Owner: sunilkcube
Type: bug | Status: new
Priority: major: does not work as expected | Milestone: Version 1.7.0
Component: Project Loading / Saving | Version: 1.6.0
Keywords: | Platform_version: 7
Platform: Windows | Must_fix: No
Status_info: 0 |
------------------------------------------------+---------------------------
Comment(by jef):
> The layers which are existing are loaded in mapcanvas and when it found
any
> missing layer the added layers are getting removed I went through the
source
> code , But I could not found the LINE of CODE , which does the function
of
> removing the added layers ?. Can anyone help me to find the LINE of
code ,
> which help me to fix the BUG ?.
For missing layer the QgsMapLayer::readXML failed (because the data
provider
fails to initialize) and the layers aren't added to the map layer
registry:
http://trac.osgeo.org/qgis/browser/trunk/qgis/src/core/qgsproject.cpp#L715
All such layer nodes are collected and later passed to
http://trac.osgeo.org/qgis/browser/trunk/qgis/src/gui/qgsprojectbadlayerguihandler.cpp#L16
which tries to update the datasource and reread the bad layer node.
--
Ticket URL: <http://trac.osgeo.org/qgis/ticket/3468#comment:3>
Quantum GIS <http://qgis.org>
Quantum GIS is an Open Source GIS viewer/editor supporting OGR, PostGIS, and GRASS formats
More information about the QGIS-trac
mailing list