void (@NotNull AnActionEvent e) { if (ImageEditorActionUtil.setEnabled(e)) { Options options = OptionsManager.getInstance().getOptions(); ZoomOptions zoomOptions = options.getEditorOptions().getZoomOptions(); ImageComponentDecorator decorator = ImageEditorActionUtil.getImageComponentDecorator(e); ImageZoomModel zoomModel = decorator.getZoomModel(); e.getPresentation().setEnabled(zoomModel.isZoomLevelChanged() || !zoomOptions.isSmartZooming()); } }