mirror of
https://github.com/leozide/leocad
synced 2025-01-17 18:11:42 +01:00
Faster piece combo updates.
This commit is contained in:
parent
04932395be
commit
3d7f0eed41
1 changed files with 2 additions and 10 deletions
|
@ -479,20 +479,12 @@ LRESULT CMainFrame::OnAddString(UINT lParam, LONG /*wParam*/)
|
|||
{
|
||||
if (lParam == NULL)
|
||||
{
|
||||
// Clear list
|
||||
m_wndPiecesBar.m_wndPiecesCombo.ResetContent();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// Search if the string is already there
|
||||
for (int i = 0; i < m_wndPiecesBar.m_wndPiecesCombo.GetCount();i++)
|
||||
{
|
||||
char tmp[100];
|
||||
m_wndPiecesBar.m_wndPiecesCombo.GetLBText (i, tmp);
|
||||
if (strcmp ((char*)lParam, tmp) == 0)
|
||||
return TRUE;
|
||||
}
|
||||
m_wndPiecesBar.m_wndPiecesCombo.AddString ((char*)lParam);
|
||||
if (m_wndPiecesBar.m_wndPiecesCombo.FindString(-1, (char*)lParam) == -1)
|
||||
m_wndPiecesBar.m_wndPiecesCombo.AddString ((char*)lParam);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue