Skip to content

Commit 8d320c4

Browse files
committed
Show save button only when saveCommand is not null
1 parent b122e02 commit 8d320c4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Pixel.Automation.Designer.ViewModels/PropertyGrid/PropertyGridViewModel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public bool IsReadOnly
2121

2222
public bool ShowSaveButton => this.onSave != null;
2323

24-
private Action onSave;
24+
private Func<Task> onSave;
2525

2626
private Func<bool> canSave;
2727

@@ -37,7 +37,7 @@ public void SetState(object selectedObject, bool isReadOnly, Func<Task> saveComm
3737
{
3838
this.selectedObject = selectedObject;
3939
this.isReadOnly = isReadOnly;
40-
this.onSave = () => saveCommand();
40+
this.onSave = saveCommand;
4141
this.canSave = canSave;
4242
NotifyOfPropertyChange(() => SelectedObject);
4343
NotifyOfPropertyChange(() => IsReadOnly);

0 commit comments

Comments
 (0)