summaryrefslogtreecommitdiff
path: root/win/Leocad.cpp
diff options
context:
space:
mode:
authorleo2002-04-12 21:59:52 +0000
committerleo2002-04-12 21:59:52 +0000
commit092422eb279bf9419831d04ed438bb4978a37573 (patch)
tree9779f5c317f6cbed54d906178890c2d0c9ef5423 /win/Leocad.cpp
parent525807c7290c8979dcdca3b210a14218c4edd8f1 (diff)
Moved Pieces Library functions to a new class.
git-svn-id: http://svn.leocad.org/trunk@291 c7d43263-9d01-0410-8a33-9dba5d9f93d6
Diffstat (limited to 'win/Leocad.cpp')
-rw-r--r--win/Leocad.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/win/Leocad.cpp b/win/Leocad.cpp
index 819a168..c5601db 100644
--- a/win/Leocad.cpp
+++ b/win/Leocad.cpp
@@ -14,6 +14,7 @@
#include "pieceinf.h" // TODO: remove
#include "config.h"
#include "mainwnd.h"
+#include "library.h"
#ifdef _DEBUG
#define new DEBUG_NEW
@@ -180,9 +181,10 @@ BOOL CCADApp::InitInstance()
else
ar >> dw;
- for (int j = 0; j < project->GetPieceLibraryCount(); j++)
+ PiecesLibrary *pLib = project->GetPiecesLibrary ();
+ for (int j = 0; j < pLib->GetPieceCount (); j++)
{
- PieceInfo* pInfo = project->GetPieceInfo(j);
+ PieceInfo* pInfo = pLib->GetPieceInfo (j);
if (strcmp (pInfo->m_strName, name) == 0)
{
@@ -310,7 +312,7 @@ void CCADApp::OnHelpUpdates()
else
str = "You are using the latest version of the program.\n";
- if (lib > project->GetPieceLibraryCount())
+ if (lib > project->GetPiecesLibrary ()->GetPieceCount ())
str += "There's an updated piece library.";
else
str += "There are no new pieces.";