Fixed text element selection when toggling single/multiline state

This commit is contained in:
tsommer committed 2023-02-16 20:41:03 +01:00
1 parent 618cfb8942
commit 795615756f
2 files changed
+11 -1

No files matched your search

+1 -1
View File
@@ -2,5 +2,5 @@
public static class Version
{
public static string Text => $"v0.9.6 (2023-02-15), .NET {Environment.Version}";
public static string Text => $"v0.9.7 (2023-02-16), .NET {Environment.Version}";
}
@@ -222,6 +222,16 @@ public partial class TextElements : UserControl
// Reload the text elements:
await this.LoadTextElements();
// Re-select the text element:
foreach (ListViewItem item in this.listTextElements.Items)
{
if ((int)item.Tag == this.currentTextElement.Id)
{
item.Selected = true;
break;
}
}
}
private async void listTextElements_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e)