Minor fixes to #3870
This commit is contained in:
@@ -325,7 +325,7 @@ namespace FlaxEditor.Modules.SourceCodeEditing
|
||||
var codeEditor = options.SourceCode.SourceCodeEditor;
|
||||
if (codeEditor != "None")
|
||||
{
|
||||
foreach (var e in Editor.Instance.CodeEditing.Editors)
|
||||
foreach (var e in _editors)
|
||||
{
|
||||
if (string.Equals(codeEditor, e.Name, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
@@ -334,10 +334,10 @@ namespace FlaxEditor.Modules.SourceCodeEditing
|
||||
}
|
||||
}
|
||||
}
|
||||
if (editor == null)
|
||||
editor = Editor.Instance.CodeEditing.Editors[0];
|
||||
if (editor == null && _editors.Count != 0)
|
||||
editor = _editors[0];
|
||||
|
||||
Editor.Instance.CodeEditing.SelectedEditor = editor;
|
||||
SelectedEditor = editor;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -145,7 +145,41 @@ CodeEditorTypes VisualStudioEditor::GetType() const
|
||||
|
||||
String VisualStudioEditor::GetName() const
|
||||
{
|
||||
return String(ToString(_version));
|
||||
const Char* name;
|
||||
switch (_version)
|
||||
{
|
||||
case VisualStudioVersion::VS2008:
|
||||
name = TEXT("Visual Studio 2008");
|
||||
break;
|
||||
case VisualStudioVersion::VS2010:
|
||||
name = TEXT("Visual Studio 2010");
|
||||
break;
|
||||
case VisualStudioVersion::VS2012:
|
||||
name = TEXT("Visual Studio 2012");
|
||||
break;
|
||||
case VisualStudioVersion::VS2013:
|
||||
name = TEXT("Visual Studio 2013");
|
||||
break;
|
||||
case VisualStudioVersion::VS2015:
|
||||
name = TEXT("Visual Studio 2015");
|
||||
break;
|
||||
case VisualStudioVersion::VS2017:
|
||||
name = TEXT("Visual Studio 2017");
|
||||
break;
|
||||
case VisualStudioVersion::VS2019:
|
||||
name = TEXT("Visual Studio 2019");
|
||||
break;
|
||||
case VisualStudioVersion::VS2022:
|
||||
name = TEXT("Visual Studio 2022");
|
||||
break;
|
||||
case VisualStudioVersion::VS2026:
|
||||
name = TEXT("Visual Studio 2026");
|
||||
break;
|
||||
default:
|
||||
name = ToString(_version);
|
||||
break;
|
||||
}
|
||||
return String(name);
|
||||
}
|
||||
|
||||
String VisualStudioEditor::GetGenerateProjectCustomArgs() const
|
||||
|
||||
Reference in New Issue
Block a user