void ClueListBox::SetClueNumber(unsigned int number) { int index = FindClue(number); wxASSERT(index != wxNOT_FOUND || number == 0); SetSelection(index); if (index != wxNOT_FOUND) { RefreshLine(index); //Update(); // We shouldn't really need this } }
bool ClueListBox::SetClue(const puz::Clue * clue) { int index = FindClue(clue); // This doesn't work for diagramless puzzles // wxASSERT(index != wxNOT_FOUND || number == _T("")); SetSelection(index); if (index != wxNOT_FOUND) { RefreshLine(index); return true; } else return false; }