# # # patch "src/model/Workspace.cpp" # from [4c9ec14e2684c486c038bf093d55a4cd8c4e21e8] # to [c10e5044c0e1e6058de6a1e56c3c05ec9cbec79f] # ============================================================ --- src/model/Workspace.cpp 4c9ec14e2684c486c038bf093d55a4cd8c4e21e8 +++ src/model/Workspace.cpp c10e5044c0e1e6058de6a1e56c3c05ec9cbec79f @@ -59,7 +59,8 @@ { if (tempDir.cd("_MTN")) { - workspaceDir->setPath(workspace); + tempDir.cdUp(); + workspaceDir->setPath(tempDir.path()); return true; } } @@ -170,7 +171,11 @@ renameMap[-id]->setRenamedTo(renameMap[id]); } - rootItem->setChildren(buildTreeRecursive(tempItems, NULL)); + // FIXME: we shouldn't really add a workspace root item here, but + // mtn automate inventory currently doesn't print the root workspace dir + WorkspaceItem* workspace = new WorkspaceItem(rootItem, workspaceDir->path(), 0, true); + rootItem->appendChild(workspace); + workspace->setChildren(buildTreeRecursive(tempItems, NULL)); // reset the model to repaint the view completly // (all QModelIndexes are discarded through that, e.g. selections!)