Browse Source

fix for loading description after threaded clip loads

scott brogden 8 years ago
parent
commit
aa49a9c246
1 changed files with 5 additions and 1 deletions
  1. 5 1
      QListCtrl.cpp

+ 5 - 1
QListCtrl.cpp

@@ -913,7 +913,10 @@ bool CQListCtrl::PostEventLoadedCheckDescription(int updatedRow)
 		int toolTipClipId = m_pToolTip->GetClipId();
 		int toolTipClipRow = m_pToolTip->GetClipRow();
 
-		log(StrF(_T("PostEventLoadedCheckDescription refreshRow: %d tt_row: %d tt_id: %d"), updatedRow, toolTipClipRow, toolTipClipId));
+		if (toolTipClipRow >= 0)
+		{
+			log(StrF(_T("PostEventLoadedCheckDescription refreshRow: %d tt_row: %d tt_id: %d"), updatedRow, toolTipClipRow, toolTipClipId));
+		}
 
 		//We tried to show the clip but we didn't have the id yet, it was loaded in a thread, now it's being updated
 		//see if we need to show this rows description
@@ -942,6 +945,7 @@ bool CQListCtrl::ShowFullDescription(bool bFromAuto, bool fromNextPrev)
 	log(StrF(_T("Show full description row: %d id: %d"), clipRow, clipId));
 
 	if(VALID_TOOLTIP && 
+		clipId > 0 &&
 		m_pToolTip->GetClipId() == clipId &&
 		::IsWindow(m_toolTipHwnd))
 	{