summaryrefslogtreecommitdiff
path: root/win/Leocad.cpp
diff options
context:
space:
mode:
authorleo2006-02-12 00:16:08 +0000
committerleo2006-02-12 00:16:08 +0000
commit5fd519ca2dd1d026929a82164246f515013552fe (patch)
treeed625df189bee3a24ddb4786ad5198dbffca4bd7 /win/Leocad.cpp
parent6ccbb0b27366b263042770d481a508dbe7335e34 (diff)
Removed old PieceInfo group code.
git-svn-id: http://svn.leocad.org/trunk@471 c7d43263-9d01-0410-8a33-9dba5d9f93d6
Diffstat (limited to 'win/Leocad.cpp')
-rw-r--r--win/Leocad.cpp73
1 files changed, 0 insertions, 73 deletions
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)