Skip to content
This repository was archived by the owner on Sep 11, 2023. It is now read-only.

Commit c34b1df

Browse files
committed
go back to using separate if for SelectMe
1 parent de71b2b commit c34b1df

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

UI/MainWindow.xaml.cs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,14 @@ public partial class MainWindow
3434

3535
private ObservableCollection<string> actionButtonDict = new()
3636
{
37-
Program.Translations.GetLanguage("Copy"), Program.Translations.GetLanguage("FTPUp"),
37+
Program.Translations.GetLanguage("Copy"),
38+
Program.Translations.GetLanguage("FTPUp"),
3839
Program.Translations.GetLanguage("StartServer")
3940
};
4041

41-
private ObservableCollection<string> compileButtonDict = new() { Program.Translations.GetLanguage("CompileAll"), Program.Translations.GetLanguage("CompileCurr")};
42+
private ObservableCollection<string> compileButtonDict = new() { Program.Translations.GetLanguage("CompileAll"), Program.Translations.GetLanguage("CompileCurr") };
4243

43-
private ObservableCollection<string> findReplaceButtonDict = new() { Program.Translations.GetLanguage("Replace"), Program.Translations.GetLanguage("ReplaceAll")};
44+
private ObservableCollection<string> findReplaceButtonDict = new() { Program.Translations.GetLanguage("Replace"), Program.Translations.GetLanguage("ReplaceAll") };
4445

4546
public MainWindow()
4647
{
@@ -204,8 +205,11 @@ private void AddEditorElement(string filePath, string name, bool SelectMe)
204205
layoutDocument.Content = editor;
205206
EditorsReferences.Add(editor);
206207
DockingPane.Children.Add(layoutDocument);
207-
layoutDocument.IsSelected = SelectMe;
208-
editor.editor.TextArea.Caret.Show();
208+
if (SelectMe)
209+
{
210+
layoutDocument.IsSelected = true;
211+
editor.editor.TextArea.Caret.Show();
212+
}
209213
}
210214

211215
private void DockingManager_ActiveContentChanged(object sender, EventArgs e)

0 commit comments

Comments
 (0)