Hi,

in the documentation, at the QgsProject entry, I read this:

bool    read (QFileInfo const &file)
        read project file

bool    read ()
        presuming that the caller has already reset the map canvas, map
registry, and legend


the first read (QFileInfo const &file) sets the project filename and calls
the second read (). As you read, it says: "presuming that the caller has
already reset the map canvas, map registry, and legend", so I wanted to use
it to append my QGIS project file to current.

But it doesn't happen: current maplayers are cleared and substituted to the
layers of the project file, althrough I still see the old project title in
the window titlebar.

Maybe it's a bug?

Here's how you can reproduce it:

write a plugin with this code:

  QgsProject.instance().read ( QFileInfo ( "<path of a qgis file>" ) )
_______________________________________________
Qgis-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to