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

Allow dropping multiple files in PadContentFactory implementation of ContentDragOption

parent 76b7858c
No related branches found
No related tags found
No related merge requests found
......@@ -372,6 +372,7 @@ public class Pad {
}
public void removePath(MediaPath path) {
getContent().unloadMedia(path);
mediaPaths.remove(path);
}
......@@ -382,6 +383,12 @@ public class Pad {
}
}
public void clearPaths() {
while (!mediaPaths.isEmpty()) {
removePath(mediaPaths.get(0));
}
}
/**
* Get the status of the pad.
*
......
......@@ -61,6 +61,13 @@ public abstract class PadContentFactory extends Component implements ContentDrag
currentPad.getController().getView().showBusyView(true);
}
if (currentPad.getContent() instanceof Playlistable) {
currentPad.clearPaths();
for (File file : files) {
currentPad.addPath(file.toPath());
}
} else {
currentPad.setPath(files.get(0).toPath());
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment