Skip to content
Snippets Groups Projects
Commit c00b4ed9 authored by Tobias Ullerich's avatar Tobias Ullerich
Browse files

Prevent drag and drop while pad is loading

parent 35893ef0
No related branches found
No related tags found
No related merge requests found
......@@ -104,6 +104,10 @@ public class DesktopPadDragListener implements EventHandler<DragEvent> {
final PadContentRegistry registry = PlayPadPlugin.getRegistries().getPadContents();
final List<PadContentFactory> supportedContentTypes = registry.getPadContentConnectsForFiles(paths);
if (currentPad.getContent() != null && currentPad.getContent().isPadLoaded()) {
return;
}
final List<ContentDragOption> contentDragOptions = new ArrayList<>(supportedContentTypes);
if (currentPad.getContent() instanceof Playlistable) {
......
......@@ -169,7 +169,7 @@ class ContentPlayerPadContent(val pad: Pad, val `type`: String) extends PadConte
*/
override def isPadLoaded: Boolean = {
mediaPlayers.isNotEmpty
mediaPlayers.isNotEmpty && mediaPlayers.stream().anyMatch(player => player.mediaPlayer.getStatus == MediaPlayer.Status.UNKNOWN)
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment