Skip to content

Commit

Permalink
Merge pull request #11804 from ronso0/track-info-double-click-fix
Browse files Browse the repository at this point in the history
(fix) WTrackProperty: focus double-clicked property field in DlgTrackInfo
  • Loading branch information
Swiftb0y authored Aug 10, 2023
2 parents 4a9d01b + 72532b5 commit 42864d2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/library/dlgtrackinfo.cpp
Original file line number Diff line number Diff line change
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 42864d2

Please sign in to comment.