Riverscapes / QRAVEPlugin

QGIS Plugin for viewing Riverscapes projects
0 stars 0 forks source link

Python error when multiple VBET 3.1.0 projects are open in QRV #106

Open shelbysawyer opened 4 months ago

shelbysawyer commented 4 months ago

I've noticed that when I have multiple projects open via QRV, adding additional projects and/or layers (particularly of the same name), this error comes up:

              QRaveMapLayer.add_layer_to_map(item)
              File "C:/Users/shelby/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qrave_toolbar\src\classes\qrave_map_layer.py", line 197, in add_layer_to_map
              elif lyr[0] == ancestry[0][0]: # bit of a hacky way to test if map layer is in the same named qproject
             IndexError: list index out of range

I think it's related to #100 (particularly the second error code I commented on that issue)

The tricky part about this error is that I don't get it all the time, and there seems to be no rhyme or reason to it. Sometimes I can have 3 or more projects open with no error-- other times, adding a second project produces this.