Playback is now forcibly stopped if the playlist is cleared.

This commit is contained in:
neviyn 2016-02-29 03:38:43 +00:00
parent ba951541b6
commit d9cfdc37dd

View File

@ -321,7 +321,10 @@ public class PlayerGUI implements PlayerCallbackInterface, LibraryCallbackInterf
playList.setComponentPopupMenu(popupMenu);
popupMenu = new JPopupMenu();
menuItem = new JMenuItem("Clear all");
menuItem.addActionListener((e) -> playlistTableModel.removeAll());
menuItem.addActionListener((e) -> {
playlistTableModel.removeAll();
player.stop();
});
popupMenu.add(menuItem);
playlistScroll.setComponentPopupMenu(popupMenu);
playlistScroll.setViewportView(playList);