rtv / Stage

Mobile robot simulator
rtv.github.com/Stage
GNU General Public License v2.0
399 stars 175 forks source link

Don't overwrite the loaded filename when opening includes #101

Open mbuijs opened 4 years ago

mbuijs commented 4 years ago

The filename of the worldfile is used to find include files, bitmaps (and maybe other things?). When handling includes that are found through the STAGEPATH, the filename of the worldfile is overwritten. Later on when for example loading bitmaps, the STAGEPATH is not evaluated anymore, instead only the filename is used. In my case bitmaps are located next to the original world file, not near files somewhere in the STAGEPATH.

Another scenario is the save functionality, which will actually attempt to save the world file to the path of the last include instead of the original world file.