Skip to content

Commit

Permalink
qml: fix appending to playlist
Browse files Browse the repository at this point in the history
fixes #27826
  • Loading branch information
jagannatharjun authored and robUx4 committed Feb 15, 2023
1 parent 961d695 commit 3d2b966
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions modules/gui/qt/dialogs/playlists/playlists.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,13 +209,18 @@ void PlaylistsDialog::onTextEdited()

void PlaylistsDialog::onAccepted()
{
MLItemId id;

QString text = m_lineEdit->text();

if (text.isEmpty())
id = m_model->getItemId(m_playlists->currentIndex().row());
{
const MLItemId playlistId = m_model->getItemId(m_playlists->currentIndex().row());
m_model->append(playlistId, m_ids);
}
else
{
m_model->create(text, m_ids);
}

close();
}

0 comments on commit 3d2b966

Please sign in to comment.