| 1592 | } |
| 1593 | |
| 1594 | DirViewTreeState *SaveTreeState(const CDiffContext& ctxt) |
| 1595 | { |
| 1596 | DirViewTreeState *pTreeState = new DirViewTreeState(); |
| 1597 | DIFFITEM *diffpos = ctxt.GetFirstDiffPosition(); |
| 1598 | while (diffpos != nullptr) |
| 1599 | { |
| 1600 | const DIFFITEM &di = ctxt.GetNextDiffPosition(diffpos); |
| 1601 | if (di.HasChildren()) |
| 1602 | { |
| 1603 | String relpath = paths::ConcatPath(di.diffFileInfo[0].path, di.diffFileInfo[0].filename); |
| 1604 | pTreeState->insert(std::pair<String, bool>(relpath, !!(di.customFlags & ViewCustomFlags::EXPANDED))); |
| 1605 | } |
| 1606 | } |
| 1607 | return pTreeState; |
| 1608 | } |
| 1609 | |
| 1610 | void RestoreTreeState(CDiffContext& ctxt, DirViewTreeState *pTreeState) |
| 1611 | { |
no test coverage detected