From 3ac9eea8bb683c41c8bcdf9329332396ec4201cb Mon Sep 17 00:00:00 2001 From: peter Date: Fri, 2 Jun 2017 19:45:30 +0200 Subject: [PATCH] IpnbRunAllCellsAction shouldn't always be enabled Signed-off-by: peter --- .../plugins/ipnb/editor/actions/IpnbRunAllCellsAction.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/python/ipnb/src/org/jetbrains/plugins/ipnb/editor/actions/IpnbRunAllCellsAction.java b/python/ipnb/src/org/jetbrains/plugins/ipnb/editor/actions/IpnbRunAllCellsAction.java index 2974c244d970..87f1a06d7911 100644 --- a/python/ipnb/src/org/jetbrains/plugins/ipnb/editor/actions/IpnbRunAllCellsAction.java +++ b/python/ipnb/src/org/jetbrains/plugins/ipnb/editor/actions/IpnbRunAllCellsAction.java @@ -75,9 +75,6 @@ public class IpnbRunAllCellsAction extends IpnbRunCellBaseAction { final DataContext context = e.getDataContext(); final IpnbFileEditor ipnbEditor = IpnbFileEditor.DATA_KEY.getData(context); final Presentation presentation = e.getPresentation(); - if (ipnbEditor == null) { - presentation.setEnabledAndVisible(false); - } - presentation.setEnabledAndVisible(true); + presentation.setEnabledAndVisible(ipnbEditor != null); } }