]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
refresh VFS on model refresh, refresh models on VFS refresh 72/head
authorThomas Debesse <dev@illwieckz.net>
Tue, 1 Aug 2017 19:13:15 +0000 (21:13 +0200)
committerThomas Debesse <dev@illwieckz.net>
Tue, 1 Aug 2017 19:13:15 +0000 (21:13 +0200)
Before:

- refreshing textures were refreshing VFS (to load enabled texture packs)
  but models were not refreshed
- refreshing textures were refreshing models but textures would be missing
  since the VFS was not refreshed and texture packs would be not loaded

After:

- refreshing textures or models both refresh VFS, textures and models,
  this way you don't anymore reload models without refreshing textures, or
  refresh VFS without reloading models, etc.

radiant/mainframe.cpp

index 8d652ef2fa25ffdf3102cde25d91475cd0f04d3d..92e1960ab8543f4c18617023fe48e0ec450e177d 100644 (file)
@@ -148,6 +148,8 @@ void VFS_Refresh(){
        QE_InitVFS();
        GlobalFileSystem().refresh();
        g_vfsInitialized = true;
+       // also refresg models
+       RefreshReferences();
        // also refresh texture browser
        TextureBrowser_RefreshShaders();
 }
@@ -3180,7 +3182,7 @@ void MainFrame_Construct(){
        GlobalCommands_insert( "SaveMapAs", FreeCaller<SaveMapAs>() );
        GlobalCommands_insert( "ExportSelected", FreeCaller<ExportMap>() );
        GlobalCommands_insert( "SaveRegion", FreeCaller<SaveRegion>() );
-       GlobalCommands_insert( "RefreshReferences", FreeCaller<RefreshReferences>() );
+       GlobalCommands_insert( "RefreshReferences", FreeCaller<VFS_Refresh>() );
        GlobalCommands_insert( "ProjectSettings", FreeCaller<DoProjectSettings>() );
        GlobalCommands_insert( "Exit", FreeCaller<Exit>() );