void (@NotNull FileEditorState state) { if (state instanceof ImageFileEditorState editorState) { Options options = OptionsManager.getInstance().getOptions(); ZoomOptions zoomOptions = options.getEditorOptions().getZoomOptions(); ImageZoomModel zoomModel = imageEditor.getZoomModel(); imageEditor.setTransparencyChessboardVisible(editorState.isBackgroundVisible()); imageEditor.setGridVisible(editorState.isGridVisible()); if (editorState.isZoomFactorChanged() || !zoomOptions.isSmartZooming()) { zoomModel.setZoomFactor(editorState.getZoomFactor()); } zoomModel.setZoomLevelChanged(editorState.isZoomFactorChanged()); } }