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

Fix drag option enable on pad loading

parent e3306502
Branches
Tags
No related merge requests found
......@@ -104,7 +104,7 @@ 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()) {
if (currentPad.getContent() != null && currentPad.getContent().isPadLoading()) {
return;
}
......
......@@ -40,6 +40,10 @@ public abstract class PadContent {
public abstract boolean isPadLoaded();
public boolean isPadLoading() {
return false;
}
/**
* Load media files.
*/
......
......@@ -184,6 +184,9 @@ class ContentPlayerPadContent(val pad: Pad, val `type`: String) extends PadConte
loadedOptional.orElse(false)
}
override def isPadLoading: Boolean = mediaPlayers.stream().anyMatch(player => player.mediaPlayer.getStatus == MediaPlayer.Status.UNKNOWN)
/**
* Load media files.
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment