Removed old code moving data from depreciated SwitchInputModeKey to ToggleInput.

This commit is contained in:
Sebastian 2020-06-28 19:18:35 +01:00
parent 5b737e111e
commit a18e2e8dfb
2 changed files with 0 additions and 30 deletions

View File

@ -53,32 +53,6 @@ void UImGuiSettings::PostInitProperties()
{
Super::PostInitProperties();
if (SwitchInputModeKey_DEPRECATED.Key.IsValid() && !ToggleInput.Key.IsValid())
{
const FString ConfigFileName = GetDefaultConfigFilename();
// Move value to the new property.
ToggleInput = MoveTemp(SwitchInputModeKey_DEPRECATED);
// Remove from configuration file entry for obsolete property.
if (FConfigFile* ConfigFile = GConfig->Find(ConfigFileName, false))
{
if (FConfigSection* Section = ConfigFile->Find(TEXT("/Script/ImGui.ImGuiSettings")))
{
if (Section->Remove(TEXT("SwitchInputModeKey")))
{
ConfigFile->Dirty = true;
GConfig->Flush(false, ConfigFileName);
}
}
}
// Add to configuration file entry for new property.
UpdateSinglePropertyInConfigFile(
UImGuiSettings::StaticClass()->FindPropertyByName(GET_MEMBER_NAME_CHECKED(UImGuiSettings, ToggleInput)),
ConfigFileName);
}
if (IsTemplate())
{
DefaultInstance = this;

View File

@ -218,10 +218,6 @@ protected:
UPROPERTY(EditAnywhere, config, Category = "DPI Scale", Meta = (ShowOnlyInnerProperties))
FImGuiDPIScaleInfo DPIScale;
// Deprecated name for ToggleInput. Kept temporarily to automatically move old configuration.
UPROPERTY(config)
FImGuiKeyInfo SwitchInputModeKey_DEPRECATED;
static UImGuiSettings* DefaultInstance;
friend class FImGuiModuleSettings;