From 092422eb279bf9419831d04ed438bb4978a37573 Mon Sep 17 00:00:00 2001 From: leo Date: Fri, 12 Apr 2002 21:59:52 +0000 Subject: Moved Pieces Library functions to a new class. git-svn-id: http://svn.leocad.org/trunk@291 c7d43263-9d01-0410-8a33-9dba5d9f93d6 --- win/Leocad.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'win/Leocad.cpp') 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."; -- cgit v1.2.3