From e5515009f944487758691facf9fb8f4ca3e0de4b Mon Sep 17 00:00:00 2001 From: Koen De Hondt Date: Thu, 19 Sep 2024 06:47:59 +0200 Subject: [PATCH] Use a block to determine the enablement state of a menu item that is created based on a command, otherwise the menu item is not enabled/disabled correctly when its parent menu opens --- src/Spec2-Commander2/CmUICommandDisplayStrategy.extension.st | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Spec2-Commander2/CmUICommandDisplayStrategy.extension.st b/src/Spec2-Commander2/CmUICommandDisplayStrategy.extension.st index 4c0a5155..dc486c83 100644 --- a/src/Spec2-Commander2/CmUICommandDisplayStrategy.extension.st +++ b/src/Spec2-Commander2/CmUICommandDisplayStrategy.extension.st @@ -5,6 +5,6 @@ CmUICommandDisplayStrategy >> display: aCmSpecCommand in: aMenuOrGroupPresenter aMenuOrGroupPresenter addItem: [ :item | aBlock value: item. - item enabled: aCmSpecCommand canBeExecuted. + item enabled: [ aCmSpecCommand canBeExecuted ]. item ] ]