MCPcopy Create free account
hub / github.com/WinMerge/winmerge / UpdateHeaderPath

Method UpdateHeaderPath

Src/DirDoc.cpp:717–733  ·  view source on GitHub ↗

* @brief Write path and filename to headerbar * @note SetText() does not repaint unchanged text */

Source from the content-addressed store, hash-verified

715 * @note SetText() does not repaint unchanged text
716 */
717void 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

Callers 8

OnCreateClientMethod · 0.45
OnIdleUpdateCmdUIMethod · 0.45
OnCreateClientMethod · 0.45
OnEditUndoMethod · 0.45
OnEditOperationMethod · 0.45
OnEditRedoMethod · 0.45
OnConvertEolToMethod · 0.45

Calls 6

SetCaptionMethod · 0.80
GetParentFrameMethod · 0.45
emptyMethod · 0.45
GetPathMethod · 0.45
GetHeaderInterfaceMethod · 0.45
SetPathMethod · 0.45

Tested by

no test coverage detected