void FEditorStyleSettingsDetails::PromptForChange( TSharedPtr<FCulture> Culture ) { if ( Culture.IsValid() && SelectedCulture != Culture ) { if ( Culture != OriginalCulture ) { // Ask the user if they want to restart.... canceling reverts the language change FFormatNamedArguments Arguments; Arguments.Add( TEXT("Language"), FText::FromString( Culture->GetNativeName() ) ); const FText Message = FText::Format( LOCTEXT("LanguageSelectionChangedMessage", "To change the displayed language to '{Language}' the Editor must be restarted.\nWould you like to restart now?"), Arguments ); const EAppReturnType::Type Answer = FMessageDialog::Open(EAppMsgType::YesNoCancel, Message); if(Answer == EAppReturnType::Yes) { // Save the setting and shutdown SelectedCulture = Culture; HandleShutdownPostPackagesSaved(); FUnrealEdMisc::Get().RestartEditor(false); } else if(Answer == EAppReturnType::No) { // Save the setting.. let the user shutdown in their own time SelectedCulture = Culture; HandleShutdownPostPackagesSaved(); } else { // If they canceled, switch back to the previous selection if possible if ( SelectedCulture.IsValid() ) { RegionComboBox->SetSelectedItem( SelectedCulture ); } else { // If there wasn't a previous one, remember this one otherwise it'll show as empty SelectedCulture = Culture; } } } else { // Save the setting, just incase we changed from the original culture, to another, then back to the original again SelectedCulture = Culture; HandleShutdownPostPackagesSaved(); } } }
void FInternationalizationSettingsModelDetails::ShoudLoadLocalizedFieldNamesCheckChanged(ESlateCheckBoxState::Type CheckState) { HandleShutdownPostPackagesSaved(); }
void FInternationalizationSettingsModelDetails::OnRegionSelectionChanged( FCulturePtr Culture, ESelectInfo::Type SelectionType ) { SelectedCulture = Culture; HandleShutdownPostPackagesSaved(); }