Skip to content

Commit e5baebd

Browse files
committed
Update the rename viewmodel to refer to the model correctly, rather than its own properties.
1 parent 56987a6 commit e5baebd

File tree

2 files changed

+23
-16
lines changed

2 files changed

+23
-16
lines changed

Rubberduck.Core/UI/Refactorings/Rename/RenameViewModel.cs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,13 @@ public RenameViewModel(RubberduckParserState state, RenameModel model) : base(mo
1818
State = state;
1919
}
2020

21-
private Declaration _target;
2221
public Declaration Target
2322
{
24-
get => _target;
23+
get => Model.Target;
2524
set
2625
{
27-
_target = value;
28-
NewName = _target.IdentifierName;
26+
Model.Target = value;
27+
NewName = Model.Target.IdentifierName;
2928

3029
OnPropertyChanged(nameof(Instructions));
3130
}
@@ -45,13 +44,12 @@ public string Instructions
4544
}
4645
}
4746

48-
private string _newName;
4947
public string NewName
5048
{
51-
get => _newName;
49+
get => Model.NewName;
5250
set
5351
{
54-
_newName = value;
52+
Model.NewName = value;
5553
OnPropertyChanged();
5654
OnPropertyChanged(nameof(IsValidName));
5755
}

Rubberduck.Resources/RubberduckUI.Designer.cs

Lines changed: 18 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)