VCS: fix group by structure for Changes | Local
authorirengrig <Irina.Chernushina@jetbrains.com>
Mon, 15 Feb 2010 12:56:41 +0000 (15 15:56 +0300)
committerirengrig <Irina.Chernushina@jetbrains.com>
Mon, 15 Feb 2010 12:56:41 +0000 (15 15:56 +0300)
platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/TreeModelBuilder.java

index 7908373..64fefab 100644 (file)
@@ -128,28 +128,36 @@ public class TreeModelBuilder {
     buildModel(changeLists);
 
     if (!modifiedWithoutEditing.isEmpty()) {
+      myFoldersCache.clear();
       buildVirtualFiles(modifiedWithoutEditing, ChangesBrowserNode.MODIFIED_WITHOUT_EDITING_TAG);
     }
     if (!unversionedFiles.isEmpty()) {
+      myFoldersCache.clear();
       buildVirtualFiles(unversionedFiles, ChangesBrowserNode.UNVERSIONED_FILES_TAG);
     }
     if (switchedRoots != null && (! switchedRoots.isEmpty())) {
+      myFoldersCache.clear();
       buildSwitchedRoots(switchedRoots);
     }
     if (!switchedFiles.isEmpty()) {
+      myFoldersCache.clear();
       buildSwitchedFiles(switchedFiles);
     }
     if (ignoredFiles != null && !ignoredFiles.isEmpty()) {
+      myFoldersCache.clear();
       buildVirtualFiles(ignoredFiles, ChangesBrowserNode.IGNORED_FILES_TAG);
     }
     if (lockedFolders != null && !lockedFolders.isEmpty()) {
+      myFoldersCache.clear();
       buildVirtualFiles(lockedFolders, ChangesBrowserNode.LOCKED_FOLDERS_TAG);
     }
     if (logicallyLockedFiles != null && (! logicallyLockedFiles.isEmpty())) {
+      myFoldersCache.clear();
       buildLogicallyLockedFiles(logicallyLockedFiles);
     }
 
     if (!locallyDeletedFiles.isEmpty()) {
+      myFoldersCache.clear();
       ChangesBrowserNode locallyDeletedNode = ChangesBrowserNode.create(myProject, VcsBundle.message("changes.nodetitle.locally.deleted.files"));
       model.insertNodeInto(locallyDeletedNode, root, root.getChildCount());
       buildLocallyDeletedPaths(locallyDeletedFiles, locallyDeletedNode);