Now the app runs correctly
This commit is contained in:
		
					parent
					
						
							
								1b832e2851
							
						
					
				
			
			
				commit
				
					
						1b76ef109c
					
				
			
		
					 1 changed files with 5 additions and 4 deletions
				
			
		| 
						 | 
					@ -30,6 +30,7 @@ import com.jfoenix.controls.JFXSnackbar;
 | 
				
			||||||
import com.jfoenix.controls.JFXSpinner;
 | 
					import com.jfoenix.controls.JFXSpinner;
 | 
				
			||||||
import es.kauron.estraba.App;
 | 
					import es.kauron.estraba.App;
 | 
				
			||||||
import es.kauron.estraba.model.DataBundle;
 | 
					import es.kauron.estraba.model.DataBundle;
 | 
				
			||||||
 | 
					import javafx.application.Platform;
 | 
				
			||||||
import javafx.concurrent.Task;
 | 
					import javafx.concurrent.Task;
 | 
				
			||||||
import javafx.event.ActionEvent;
 | 
					import javafx.event.ActionEvent;
 | 
				
			||||||
import javafx.fxml.FXML;
 | 
					import javafx.fxml.FXML;
 | 
				
			||||||
| 
						 | 
					@ -144,17 +145,17 @@ public class SplashController implements Initializable{
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        root.getScene().setOnDragOver(e -> {
 | 
					        Platform.runLater(() -> root.getScene().setOnDragOver(e -> {
 | 
				
			||||||
            Dragboard db = e.getDragboard();
 | 
					            Dragboard db = e.getDragboard();
 | 
				
			||||||
            if (db.hasFiles()) {
 | 
					            if (db.hasFiles()) {
 | 
				
			||||||
                e.acceptTransferModes(TransferMode.COPY);
 | 
					                e.acceptTransferModes(TransferMode.COPY);
 | 
				
			||||||
            } else {
 | 
					            } else {
 | 
				
			||||||
                e.consume();
 | 
					                e.consume();
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        });
 | 
					        }));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // Dropping over surface
 | 
					        // Dropping over surface
 | 
				
			||||||
        root.getScene().setOnDragDropped(e -> {
 | 
					        Platform.runLater(() -> root.getScene().setOnDragDropped(e -> {
 | 
				
			||||||
            Dragboard db = e.getDragboard();
 | 
					            Dragboard db = e.getDragboard();
 | 
				
			||||||
            boolean success = false;
 | 
					            boolean success = false;
 | 
				
			||||||
            if (db.hasFiles()) {
 | 
					            if (db.hasFiles()) {
 | 
				
			||||||
| 
						 | 
					@ -167,7 +168,7 @@ public class SplashController implements Initializable{
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            e.setDropCompleted(success);
 | 
					            e.setDropCompleted(success);
 | 
				
			||||||
            e.consume();
 | 
					            e.consume();
 | 
				
			||||||
        });
 | 
					        }));
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private void errorLoading() {
 | 
					    private void errorLoading() {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in a new issue