From 5fd519ca2dd1d026929a82164246f515013552fe Mon Sep 17 00:00:00 2001 From: leo Date: Sun, 12 Feb 2006 00:16:08 +0000 Subject: Removed old PieceInfo group code. git-svn-id: http://svn.leocad.org/trunk@471 c7d43263-9d01-0410-8a33-9dba5d9f93d6 --- win/Leocad.cpp | 73 ---------------------------------------------------------- 1 file changed, 73 deletions(-) (limited to 'win/Leocad.cpp') diff --git a/win/Leocad.cpp b/win/Leocad.cpp index 6dbcce1..fb409bd 100644 --- a/win/Leocad.cpp +++ b/win/Leocad.cpp @@ -218,79 +218,6 @@ BOOL CCADApp::InitInstance() ((CMainFrame*)(AfxGetMainWnd()))->m_wndPiecesBar.m_wndPiecePreview.PostMessage(WM_PAINT); } - // TODO: move this to the project. - CString cfg = GetProfileString("Settings","Groups",""); - if (!cfg.IsEmpty()) - { - UINT j, i; - CWaitCursor wait; - CFile f; - if (f.Open(cfg, CFile::modeRead|CFile::shareDenyWrite) != 0) - if (f.GetLength() != 0) - { - CArchive ar(&f, CArchive::load | CArchive::bNoFlushOnDelete); - char tmp[33]; - float ver; - CString str; - UINT n; - ar.Read (tmp, 32); - ar >> ver; - if (ver == 0.1f) - ar >> i; - else - { - BYTE b; - ar >> b; - for (j = 0; j < b; j++) - { - ar.Read (tmp, 33); - - if (ver > 0.2f) - ar >> i; - } - } - if (ver > 0.2f) - { - CImageList iml; - iml.Read(&ar); - } - - ar >> n; - for (i = 0; i < n; i++) - { - DWORD dw; - char name[9]; - ar.Read (name, 9); - - if (ver == 0.1f) - { - char tmp[65]; - BYTE b; - ar.Read (tmp, 65); - ar >> b; - dw = 1 << b; - } - else - ar >> dw; - - PiecesLibrary *pLib = project->GetPiecesLibrary (); - for (int j = 0; j < pLib->GetPieceCount (); j++) - { - PieceInfo* pInfo = pLib->GetPieceInfo (j); - - if (strcmp (pInfo->m_strName, name) == 0) - { - pInfo->m_nGroups = dw; - break; - } - } - } - ar.Close(); - f.Close(); - } - } - - /* m_hMutex = CreateMutex(NULL, FALSE, _T("LeoCAD_Mutex")); if (GetLastError() == ERROR_ALREADY_EXISTS) -- cgit v1.2.3