Added canExecute to ShowManifestCommand

This commit is contained in:
erri120 2020-08-30 11:45:46 +02:00
parent 5d916da1ab
commit 106a92cff5
No known key found for this signature in database
GPG Key ID: A8C0A18D8D4D3135

View File

@ -308,11 +308,13 @@ namespace Wabbajack
})
.ToGuiProperty(this, nameof(ModListName));
// Define commands
ShowManifestCommand = ReactiveCommand.Create(() =>
{
new ManifestWindow(ModList.SourceModList).Show();
});
}, this.WhenAny(x => x.ModList)
.Select(x => x?.SourceModList != null)
.ObserveOnGuiThread());
OpenReadmeCommand = ReactiveCommand.Create(
execute: () => this.ModList?.OpenReadme(),
canExecute: this.WhenAny(x => x.ModList)