Skip to content

Commit 76f0819

Browse files
Bug fixed
1 parent 54ca65e commit 76f0819

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/Files.App/Views/SettingsPages/Advanced.xaml.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,10 @@ private void EndEditing(TextBox? textBox)
4747
private void EditTag_Click(object sender, RoutedEventArgs e)
4848
{
4949
if (editingTag is not null)
50+
{
5051
editingTag.IsEditing = false;
52+
editingTag.NewColor = editingTag.Tag.Color;
53+
}
5154

5255
editingTag = (ListedTagViewModel)((Button)sender).DataContext;
5356
editingTag.NewColor = editingTag.Tag.Color;
@@ -81,6 +84,7 @@ private void CancelRenameTag_Click(object sender, RoutedEventArgs e)
8184
{
8285
var editingTag = (ListedTagViewModel)((Button)sender).DataContext;
8386
var item = TagsList.ContainerFromItem(editingTag) as ListViewItem;
87+
editingTag.NewColor = editingTag.Tag.Color;
8488

8589
EndEditing(item.FindDescendant("TagNameTextBox") as TextBox);
8690
}

src/Files.Backend/ViewModels/FileTags/ListedTagViewModel.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,7 @@ public TagViewModel Tag
1515
public bool IsEditing
1616
{
1717
get => isEditing;
18-
set
19-
{
20-
if (SetProperty(ref isEditing, value) && !value)
21-
NewColor = tag.Color;
22-
}
18+
set => SetProperty(ref isEditing, value);
2319
}
2420

2521
private bool isNameValid = true;

0 commit comments

Comments
 (0)