diff --git a/pdfsam-ui-components/src/main/java/org/pdfsam/ui/components/selection/multiple/SelectionTable.java b/pdfsam-ui-components/src/main/java/org/pdfsam/ui/components/selection/multiple/SelectionTable.java index be5fe17e..fbd51cb4 100644 --- a/pdfsam-ui-components/src/main/java/org/pdfsam/ui/components/selection/multiple/SelectionTable.java +++ b/pdfsam-ui-components/src/main/java/org/pdfsam/ui/components/selection/multiple/SelectionTable.java @@ -393,6 +393,7 @@ private Consumer onDragEnteredConsumer() { } private void onDragExited(DragEvent e) { + clearDragHover(); placeHolder.setDisable(true); e.consume(); } @@ -421,7 +422,7 @@ public void onLoadDocumentsRequest(PdfLoadRequest loadEvent) { getSortOrder().clear(); getItems().addAll(dropIndex, toDrop); focus.map(getItems()::indexOf).ifPresent(getFocusModel()::focus); - hoverIndex.setValue(-1); + clearDragHover(); this.sort(); loadEvent.getDocuments().stream().findFirst().ifPresent( @@ -558,4 +559,8 @@ private int calculateHoverIndex(DragEvent event) { return -1; } + + private void clearDragHover() { + hoverIndex.setValue(-1); + } }