Fix PathPicker SelectedPathsText

This commit is contained in:
Yuki Kurano
2026-01-06 23:32:49 +08:00
parent 14f549b01f
commit f740484f4c

View File

@@ -1,5 +1,4 @@
using System.Text; using System.Text.RegularExpressions;
using System.Text.RegularExpressions;
using System.Windows.Input; using System.Windows.Input;
using Avalonia; using Avalonia;
using Avalonia.Controls; using Avalonia.Controls;
@@ -159,17 +158,8 @@ public partial class PathPicker : TemplatedControl
if (change.Property == SelectedPathsProperty) if (change.Property == SelectedPathsProperty)
{ {
_twoConvertLock = true; _twoConvertLock = true;
var stringBuilder = new StringBuilder();
if (SelectedPaths.Count != 0)
{
stringBuilder.Append(SelectedPaths[0]);
foreach (var item in SelectedPaths.Skip(1))
{
stringBuilder.AppendLine(item);
}
}
SelectedPathsText = stringBuilder.ToString(); SelectedPathsText = string.Join(Environment.NewLine, SelectedPaths);
_twoConvertLock = false; _twoConvertLock = false;
} }