Skip to content

Commit

Permalink
Небошльшая оптимизация и корректировка предыдущего коммита.
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksoid1978 committed May 4, 2024
1 parent 08a0a10 commit a12a9fa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/apps/mplayerc/PlayerPlaylistBar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2444,16 +2444,16 @@ void CPlayerPlaylistBar::SetCurValid(const bool bValid)
auto index = FindItem(pos);
if (index >= 0) {
m_list.SetItemText(index, COL_NAME, pli.GetLabel(0));
m_list.SetItemText(index, COL_TIME, pli.GetLabel(1));
}
}
m_list.Invalidate();
}
break;
}
}
}

void CPlayerPlaylistBar::SetCurLabel(CString label)
void CPlayerPlaylistBar::SetCurLabel(const CString& label)
{
for (size_t i = 0; i < m_tabs.size(); i++) {
if (m_nCurPlaybackListId == m_tabs[i].id) {
Expand Down Expand Up @@ -2901,7 +2901,7 @@ void CPlayerPlaylistBar::OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruc

pDC->SetTextColor(textcolor);

CString time = pli.GetLabel(1);
CString time = m_list.GetItemText(nItem, COL_TIME);
if (time.GetLength()) {
CSize timesize = pDC->GetTextExtent(time);
if ((3 + timesize.cx + 3) < rcItem.Width() / 2) {
Expand Down
2 changes: 1 addition & 1 deletion src/apps/mplayerc/PlayerPlaylistBar.h
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ class CPlayerPlaylistBar : public CPlayerBar
void SetLast();
void SetCurValid(const bool bValid);
void SetCurTime(REFERENCE_TIME rt);
void SetCurLabel(CString label);
void SetCurLabel(const CString& label);
void Randomize();

void Refresh();
Expand Down

0 comments on commit a12a9fa

Please sign in to comment.