void MainWindow::removeSelectedItem()
{
+ if (QMessageBox::question(this, "Confirm remove", "Are you sure you want to remove this item?", QMessageBox::Yes, QMessageBox::No) == QMessageBox::No)
+ return;
int row = musicTable->currentRow();
if (row >= 0)
plman.removeItem(row);
void MainWindow::removeAllButSelectedItem()
{
+ if (QMessageBox::question(this, "Confirm remove", "Are you sure you want to remove all other items?", QMessageBox::Yes, QMessageBox::No) == QMessageBox::No)
+ return;
int row = musicTable->currentRow();
if (row >= 0)
{
items.append(PlaylistItem (PlaylistItem (fname)));
}
}
- if (!items.isEmpty())
+// if (!items.isEmpty())
+ if (items.size () > index)
{
metaInformationResolver->setCurrentSource(items.at(index).source);
lastMetaRead = index;
items.append(PlaylistItem (string));
}
}
- if (!items.isEmpty())
+// if (!items.isEmpty())
+ if (items.size () > index)
{
metaInformationResolver->setCurrentSource(items.at(index).source);
lastMetaRead = index;
appendPlaylist(filename);
else if (filename.right(4).toLower() == ".pls")
appendPlaylistPLS(filename);
- if (!items.isEmpty())
+ if (items.size () > index)
+// if (!items.isEmpty())
{
metaInformationResolver->setCurrentSource(items.at(index).source);
lastMetaRead = index;