]> git.xonotic.org Git - xonotic/netradiant.git/commit
[dpkdir] restart VFS only for Map_Free() and Map_LoadFile(), refresh others
authorThomas Debesse <dev@illwieckz.net>
Tue, 18 Jul 2017 11:04:26 +0000 (13:04 +0200)
committerThomas Debesse <dev@illwieckz.net>
Sat, 29 Jul 2017 16:11:08 +0000 (18:11 +0200)
commitff58d04be4e8fed403a791736db05c76fa3adb65
tree7e45cafd75703c9d7535872317cf123e7c26deba
parent5186bc0aee4b0b577af6241a4abd34e0041cf77a
[dpkdir] restart VFS only for Map_Free() and Map_LoadFile(), refresh others

Since there is no map file observer anymore for that stuff,
we Restart or Refresh it explicitely when needed.

- Opening map or New map needs Restarting VFS.
- Saving map or Renaming map (Save as) needs Refreshing VFS.

The Refresh also triggers the Texture browser.

A previous fix for #105 was done Refreshing VFS instead of Restarting it
but it was not perfect, for example map opening behavior is better with
VFS restart, and map saving needs to refresh the VFS and the texture
browser but not restart (that was the earlier fault). So, it's clearly
not a good idea to trigger either Refresh or Restart on any map event
since the behavior differs according to the event.

If one day one plugin wants to act on VFS on map event, it must refresh or
restart VFS according to what the plugin does. It does not make sense to
trigger the same task for different events.
radiant/mainframe.cpp
radiant/map.cpp
radiant/texwindow.cpp
radiant/texwindow.h