summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorleo2005-12-22 16:33:39 +0000
committerleo2005-12-22 16:33:39 +0000
commit2e854ed61c1aa804e0d373ca5af1d87882511a11 (patch)
tree63966259c5096fa5514712137bd53dab61260ec8
parent2bb4077086d23164941750e9cecf5a40889a7b40 (diff)
Fixed a few small PLM bugs.
git-svn-id: http://svn.leocad.org/trunk@445 c7d43263-9d01-0410-8a33-9dba5d9f93d6
-rwxr-xr-xcommon/library.cpp2
-rw-r--r--win/Libdlg.cpp3
2 files changed, 4 insertions, 1 deletions
diff --git a/common/library.cpp b/common/library.cpp
index 4da81b9..b2bed83 100755
--- a/common/library.cpp
+++ b/common/library.cpp
@@ -405,6 +405,8 @@ bool PiecesLibrary::LoadCategories(const char* FileName)
if (i != LC_CATEGORY_FILE_VERSION)
return false;
+ m_Categories.RemoveAll();
+
File.ReadInt(&i);
while (i--)
{
diff --git a/win/Libdlg.cpp b/win/Libdlg.cpp
index fc45916..75d1223 100644
--- a/win/Libdlg.cpp
+++ b/win/Libdlg.cpp
@@ -120,6 +120,7 @@ BOOL CLibraryDlg::OnCommand(WPARAM wParam, LPARAM lParam)
case ID_LIBDLG_FILE_OPEN:
{
project->GetPiecesLibrary()->LoadCategories(NULL);
+ UpdateTree();
return TRUE;
}
@@ -158,7 +159,7 @@ BOOL CLibraryDlg::OnCommand(WPARAM wParam, LPARAM lParam)
free(opts.filenames);
- UpdateList();
+ UpdateTree();
}
return TRUE;