From da542029ff93f1a2088143578eccf908385a2037 Mon Sep 17 00:00:00 2001 From: Markus Weigelt Date: Wed, 24 Jan 2024 14:58:01 +0100 Subject: [PATCH] Update Kitodo/src/main/java/org/kitodo/production/forms/dataeditor/GalleryPanel.java Co-authored-by: Arved Solth --- .../org/kitodo/production/forms/dataeditor/GalleryPanel.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kitodo/src/main/java/org/kitodo/production/forms/dataeditor/GalleryPanel.java b/Kitodo/src/main/java/org/kitodo/production/forms/dataeditor/GalleryPanel.java index f7abd681fc0..cbb9a590f64 100644 --- a/Kitodo/src/main/java/org/kitodo/production/forms/dataeditor/GalleryPanel.java +++ b/Kitodo/src/main/java/org/kitodo/production/forms/dataeditor/GalleryPanel.java @@ -949,7 +949,7 @@ private void defaultSelect(GalleryMediaContent currentSelection, GalleryStripe p dataEditor.getSelectedMedia().clear(); LogicalDivision logicalDivision = parentStripe.getStructure(); PhysicalDivision physicalDivision = currentSelection.getView().getPhysicalDivision(); - if (physicalDivision.hasMediaPartial()) { + if (physicalDivision.hasMediaPartial() && !physicalDivision.getLogicalDivisions().isEmpty()) { logicalDivision = physicalDivision.getLogicalDivisions().get(0); } dataEditor.getSelectedMedia().add(new ImmutablePair<>(physicalDivision, logicalDivision));