refactor template class LatchedValue use

make m_sGameFile LatchedValue
fix odd prompt to restart after game change via global preferences dialog + OK in local preferences
sort games list alphabetically by .game file name
This commit is contained in:
Garux
2019-09-07 20:55:55 +03:00
parent 1a18246a1f
commit 4ebfc1dcac
7 changed files with 98 additions and 97 deletions

View File

@@ -651,11 +651,9 @@ typedef ReferenceCaller1<EntityCreator, const IntImportCallback&, ShowNamesRatio
void ShowTargetNamesImport( EntityCreator& self, bool value ){
const bool oldvalue = self.getShowTargetNames();
if( self.getShowTargetNames() != value )
PreferencesDialog_restartRequired( "Entity Names = Targetnames" ); // technically map reloading or entities recreation do update too, as it's not LatchedValue
self.setShowTargetNames( value );
if( oldvalue != value ){
PreferencesDialog_restartRequired( "Entity Names = Targetnames" );
}
}
typedef ReferenceCaller1<EntityCreator, bool, ShowTargetNamesImport> ShowTargetNamesImportCaller;