Skip to content

Commit

Permalink
Reworded t in pr (#8989)
Browse files Browse the repository at this point in the history
  • Loading branch information
calixtus authored Jul 18, 2022
1 parent 3beb9af commit be4a7c5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main/java/org/jabref/gui/JabRefFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,8 @@ private void initDragAndDrop() {
this.getScene().setOnDragEntered(event -> {
// It is necessary to setOnDragOver for newly opened tabs
// drag'n'drop on tabs covered dnd on tabbedPane, so dnd on tabs should contain all dnds on tabbedPane
tabbedPane.lookupAll(".tab").forEach(t -> {
t.setOnDragOver(tabDragEvent -> {
tabbedPane.lookupAll(".tab").forEach(tab -> {
tab.setOnDragOver(tabDragEvent -> {
if (DragAndDropHelper.hasBibFiles(tabDragEvent.getDragboard())) {
tabDragEvent.acceptTransferModes(TransferMode.ANY);
if (!tabbedPane.getTabs().contains(dndIndicator)) {
Expand All @@ -249,8 +249,8 @@ private void initDragAndDrop() {
tabDragEvent.consume();
}
});
t.setOnDragExited(event1 -> tabbedPane.getTabs().remove(dndIndicator));
t.setOnDragDropped(tabDragEvent -> {
tab.setOnDragExited(event1 -> tabbedPane.getTabs().remove(dndIndicator));
tab.setOnDragDropped(tabDragEvent -> {
if (DragAndDropHelper.hasBibFiles(tabDragEvent.getDragboard())) {
tabbedPane.getTabs().remove(dndIndicator);
List<Path> bibFiles = DragAndDropHelper.getBibFiles(tabDragEvent.getDragboard());
Expand All @@ -260,7 +260,7 @@ private void initDragAndDrop() {
tabDragEvent.consume();
} else {
for (Tab libraryTab : tabbedPane.getTabs()) {
if (libraryTab.getId().equals(t.getId()) &&
if (libraryTab.getId().equals(tab.getId()) &&
!tabbedPane.getSelectionModel().getSelectedItem().equals(libraryTab)) {
((LibraryTab) libraryTab).dropEntry(stateManager.getLocalDragboard().getBibEntries());
}
Expand Down

0 comments on commit be4a7c5

Please sign in to comment.