mirror of
https://github.com/leozide/leocad
synced 2025-01-30 20:34:56 +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)
|
if (lParam == NULL)
|
||||||
{
|
{
|
||||||
// Clear list
|
|
||||||
m_wndPiecesBar.m_wndPiecesCombo.ResetContent();
|
m_wndPiecesBar.m_wndPiecesCombo.ResetContent();
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Search if the string is already there
|
if (m_wndPiecesBar.m_wndPiecesCombo.FindString(-1, (char*)lParam) == -1)
|
||||||
for (int i = 0; i < m_wndPiecesBar.m_wndPiecesCombo.GetCount();i++)
|
m_wndPiecesBar.m_wndPiecesCombo.AddString ((char*)lParam);
|
||||||
{
|
|
||||||
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);
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue