]> de.git.xonotic.org Git - xonotic/netradiant.git/commitdiff
radiant/texwindow: use TextureBrowser_showWads when possible 166/head
authorThomas Debesse <dev@illwieckz.net>
Fri, 22 May 2020 16:17:35 +0000 (18:17 +0200)
committerThomas Debesse <dev@illwieckz.net>
Fri, 22 May 2020 16:21:18 +0000 (18:21 +0200)
instead of doing alternatively:
- !string_empty( g_pGameDescription->getKeyValue( "show_wads" ) )
- TextureBrowser_showWads()

the last one calling:
- !string_empty( g_pGameDescription->getKeyValue( "show_wads" ) )

radiant/texwindow.cpp

index 62b7460cdc28feacd005eeba2d07c5cd3c6bb932..75d3788d607f55a0f3e34de14d917f82f0f2b976 100644 (file)
@@ -1746,7 +1746,7 @@ ui::MenuItem TextureBrowser_constructViewMenu( ui::Menu menu ){
        create_menu_item_with_mnemonic( menu, "Show All", "ShowAllTextures" );
 
        // we always want to show shaders but don't want a "Show Shaders" menu for doom3 and .wad file games
-       if ( g_pGameDescription->mGameType == "doom3" || !string_empty( g_pGameDescription->getKeyValue( "show_wads" ) ) ) {
+       if ( g_pGameDescription->mGameType == "doom3" || TextureBrowser_showWads() ) {
                g_TextureBrowser.m_showShaders = true;
        }
        else