diff --git a/src/main/java/org/jabref/gui/entryeditor/FieldsEditorTab.java b/src/main/java/org/jabref/gui/entryeditor/FieldsEditorTab.java index eec4567e718..39cfdf8ff89 100644 --- a/src/main/java/org/jabref/gui/entryeditor/FieldsEditorTab.java +++ b/src/main/java/org/jabref/gui/entryeditor/FieldsEditorTab.java @@ -251,7 +251,7 @@ private void addPreviewPanel() { public void removePreviewPanelFromThisTab() { assert this.getContent() instanceof SplitPane; - if (this.getContent() instanceof SplitPane splitPane && splitPane.getItems().contains(previewPanel)) { + if (this.getContent() instanceof SplitPane splitPane) { splitPane.getItems().remove(previewPanel); // Needed to "redraw" the split pane with one item (because JavaFX does not readjust if it is shown) // splitPane.setDividerPositions(1.0); @@ -260,10 +260,10 @@ public void removePreviewPanelFromThisTab() { @Override protected void handleFocus() { - LOGGER.error("This is {}", preferences.getPreviewPreferences().showPreviewAsExtraTabProperty().get()); - LOGGER.error("This is then {}", !preferences.getPreviewPreferences().showPreviewAsExtraTabProperty().get()); + LOGGER.trace("This is {}", preferences.getPreviewPreferences().showPreviewAsExtraTabProperty().get()); + LOGGER.trace("This is then {}", !preferences.getPreviewPreferences().showPreviewAsExtraTabProperty().get()); if (!preferences.getPreviewPreferences().showPreviewAsExtraTabProperty().get()) { - LOGGER.error("Focus on preview panel"); + LOGGER.trace("Focus on preview panel"); // We need to move the preview panel from the non-visible tab to the visible tab removePreviewPanelFromOtherTabs();