Skip to content

Commit

Permalink
Hide diffs when one of the field values is blank a.k.a no conflict (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
HoussemNasri authored Sep 1, 2022
1 parent cd70582 commit 48f9270
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import org.jabref.gui.mergeentries.newmergedialog.toolbar.ThreeWayMergeToolbar;
import org.jabref.model.entry.BibEntry;
import org.jabref.model.entry.field.Field;
import org.jabref.model.strings.StringUtil;

import com.tobiasdiez.easybind.EasyBind;
import org.fxmisc.richtext.StyleClassedTextArea;
Expand Down Expand Up @@ -150,7 +151,7 @@ public MergedFieldCell getMergedValueCell() {
}

public void showDiff(ShowDiffConfig diffConfig) {
if (!rightValueCell.isVisible()) {
if (!rightValueCell.isVisible() || StringUtil.isNullOrEmpty(viewModel.getLeftFieldValue()) || StringUtil.isNullOrEmpty(viewModel.getRightFieldValue())) {
return;
}
LOGGER.debug("Showing diffs...");
Expand Down

0 comments on commit 48f9270

Please sign in to comment.