* @brief Write path and filename to headerbar * @note SetText() does not repaint unchanged text */
| 715 | * @note SetText() does not repaint unchanged text |
| 716 | */ |
| 717 | void CDirDoc::UpdateHeaderPath(int nIndex) |
| 718 | { |
| 719 | CDirFrame *pf = m_pDirView->GetParentFrame(); |
| 720 | ASSERT(pf != nullptr); |
| 721 | String sText; |
| 722 | |
| 723 | if (!m_strDesc[nIndex].empty()) |
| 724 | sText = m_strDesc[nIndex]; |
| 725 | else |
| 726 | { |
| 727 | sText = m_pCtxt->GetPath(nIndex); |
| 728 | ApplyDisplayRoot(nIndex, sText); |
| 729 | } |
| 730 | |
| 731 | pf->GetHeaderInterface()->SetCaption(nIndex, sText); |
| 732 | pf->GetHeaderInterface()->SetPath(nIndex, m_pCtxt->GetPath(nIndex)); |
| 733 | } |
| 734 | |
| 735 | /** |
| 736 | * @brief virtual override called just before document is saved and closed |
no test coverage detected