Skip to content

Commit 90a2fe8

Browse files
Update src/Files.App/Views/Pages/PropertiesGeneral.xaml.cs
Co-authored-by: Quaint Mako <110472580+QuaintMako@users.noreply.github.com>
1 parent bc92629 commit 90a2fe8

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/Files.App/Views/Pages/PropertiesGeneral.xaml.cs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,15 @@ private void ItemFileName_GettingFocus(UIElement _, GettingFocusEventArgs e)
112112
}
113113
private void ItemFileName_LosingFocus(UIElement _, LosingFocusEventArgs e)
114114
{
115-
if (string.IsNullOrWhiteSpace(ItemFileName.Text))
116-
ItemFileName.Text = ViewModel.ItemName;
117-
else
115+
if (string.IsNullOrWhiteSpace(ItemFileName.Text))
118116
{
119-
var match = letterRegex.Match(ViewModel.OriginalItemName);
120-
if (match.Success)
121-
ItemFileName.Text += match.Value;
117+
ItemFileName.Text = ViewModel.ItemName;
118+
return;
122119
}
120+
121+
var match = letterRegex.Match(ViewModel.OriginalItemName);
122+
if (match.Success)
123+
ItemFileName.Text += match.Value;
123124
}
124125

125126
private void DiskCleanupButton_Click(object sender, RoutedEventArgs e)

0 commit comments

Comments
 (0)