Playback is now forcibly stopped if the playlist is cleared.
This commit is contained in:
parent
ba951541b6
commit
d9cfdc37dd
@ -321,7 +321,10 @@ public class PlayerGUI implements PlayerCallbackInterface, LibraryCallbackInterf
|
|||||||
playList.setComponentPopupMenu(popupMenu);
|
playList.setComponentPopupMenu(popupMenu);
|
||||||
popupMenu = new JPopupMenu();
|
popupMenu = new JPopupMenu();
|
||||||
menuItem = new JMenuItem("Clear all");
|
menuItem = new JMenuItem("Clear all");
|
||||||
menuItem.addActionListener((e) -> playlistTableModel.removeAll());
|
menuItem.addActionListener((e) -> {
|
||||||
|
playlistTableModel.removeAll();
|
||||||
|
player.stop();
|
||||||
|
});
|
||||||
popupMenu.add(menuItem);
|
popupMenu.add(menuItem);
|
||||||
playlistScroll.setComponentPopupMenu(popupMenu);
|
playlistScroll.setComponentPopupMenu(popupMenu);
|
||||||
playlistScroll.setViewportView(playList);
|
playlistScroll.setViewportView(playList);
|
||||||
|
Loading…
Reference in New Issue
Block a user