Skip to content

Commit

Permalink
(fix) WTrackProperty: focus double-clicked property field in DlgTrack…
Browse files Browse the repository at this point in the history
…Info
  • Loading branch information
ronso0 committed Aug 10, 2023
1 parent c3df3da commit 72532b5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/library/dlgtrackinfo.cpp
Expand Up @@ -67,6 +67,7 @@ void DlgTrackInfo::init() {
// Associate with property strings taken from library/dao/trackdao.h
m_propertyWidgets.insert("artist", txtArtist);
m_propertyWidgets.insert("title", txtTrackName);
m_propertyWidgets.insert("titleInfo", txtTrackName);
m_propertyWidgets.insert("album", txtAlbum);
m_propertyWidgets.insert("album_artist", txtAlbumArtist);
m_propertyWidgets.insert("composer", txtComposer);
Expand Down Expand Up @@ -504,9 +505,9 @@ void DlgTrackInfo::focusField(const QString& property) {
if (property.isEmpty()) {
return;
}
QWidget* w = m_propertyWidgets.find(property).value();
if (w) {
w->setFocus();
auto it = m_propertyWidgets.constFind(property);
if (it != m_propertyWidgets.constEnd()) {
it.value()->setFocus();
}
}

Expand Down

0 comments on commit 72532b5

Please sign in to comment.