Closed MattReimer closed 1 year ago
I think we should be able to solve this fairly easily by hooking into the project save and injecting the paths.
https://gis.stackexchange.com/questions/75221/qgis-action-adding-layers-using-relative-paths
QgsProject.instance().fileName() // gives you the project path.
There is a fix for this now. I need to test it on windows though before we commit to it.
Currently when you save a QGis project with QRave projects open, those QRave projects get stored inside that project file so that when you open it again you get the same projects opening.
Internally this is handled when you open a project:
https://github.com/Riverscapes/QRAVEPlugin/blob/master/src/dock_widget.py#L210-L211
but there's a problem. We're storing absolute paths. There are two reasons why this is a problem.
.qgz
file and a bunch of QRave projects. If you move this folder (for example from your c: drive onto your d: drive then this QGis project will load the layers but not the projectsWe should not have the layers being stored with relative paths while the projects are stored with absolute paths.
The task here is to make sure the QGZ file contains relative paths so we don't end up with the following: