void FSourceControlModule::HandleModularFeatureUnregistered(const FName& Type, IModularFeature* ModularFeature) { if(Type == SourceControlFeatureName && CurrentSourceControlProvider == static_cast<ISourceControlProvider*>(ModularFeature)) { ClearCurrentSourceControlProvider(); } }
void FSourceControlModule::SetCurrentSourceControlProvider(ISourceControlProvider& InProvider) { // see if we are switching or not if(&InProvider == CurrentSourceControlProvider) { return; } ClearCurrentSourceControlProvider(); CurrentSourceControlProvider = &InProvider; CurrentSourceControlProvider->Init(false); // Don't force a connection here, as its synchronous. Let the user establish a connection. SourceControlSettings.SetProvider(CurrentSourceControlProvider->GetName().ToString()); SaveSettings(); }