From be248aceedaa02f6c79ae2fefd0ba467b589bed9 Mon Sep 17 00:00:00 2001 From: Ged Murphy Date: Mon, 21 Dec 2009 16:17:18 +0000 Subject: [PATCH] Don't re-add the dependants svn path=/trunk/; revision=44682 --- .../mscutils/servman/propsheet_depends.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/reactos/base/applications/mscutils/servman/propsheet_depends.c b/reactos/base/applications/mscutils/servman/propsheet_depends.c index 3bfc6fd36d6..d4f77591347 100644 --- a/reactos/base/applications/mscutils/servman/propsheet_depends.c +++ b/reactos/base/applications/mscutils/servman/propsheet_depends.c @@ -223,11 +223,21 @@ DependenciesPageProc(HWND hwndDlg, { if (lpnmtv->hdr.idFrom == IDC_DEPEND_TREE1) { - TV1_AddDependantsToTree(pDlgInfo, lpnmtv->itemNew.hItem, (LPTSTR)lpnmtv->itemNew.lParam); + /* Has this node been expanded before */ + if (!TreeView_GetChild(pDlgInfo->hDependsTreeView1, lpnmtv->itemNew.hItem)) + { + /* It's not, add the children */ + TV1_AddDependantsToTree(pDlgInfo, lpnmtv->itemNew.hItem, (LPTSTR)lpnmtv->itemNew.lParam); + } } else if (lpnmtv->hdr.idFrom == IDC_DEPEND_TREE2) { - TV2_AddDependantsToTree(pDlgInfo, lpnmtv->itemNew.hItem, (LPTSTR)lpnmtv->itemNew.lParam); + /* Has this node been expanded before */ + if (!TreeView_GetChild(pDlgInfo->hDependsTreeView1, lpnmtv->itemNew.hItem)) + { + /* It's not, add the children */ + TV2_AddDependantsToTree(pDlgInfo, lpnmtv->itemNew.hItem, (LPTSTR)lpnmtv->itemNew.lParam); + } } } break;