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

Method UpdateLocationViewPosition

Src/MergeEditView.cpp:4105–4118  ·  view source on GitHub ↗

* @brief Update LocationView position. * This function updates LocationView position to given lines. * Usually we want to lines in file compare view and area in * LocationView to match. Be extra carefull to not call non-existing * LocationView. * @param [in] nTopLine Top line of current view. * @param [in] nBottomLine Bottom line of current view. */

Source from the content-addressed store, hash-verified

4103 * @param [in] nBottomLine Bottom line of current view.
4104 */
4105void CMergeEditView::UpdateLocationViewPosition(int nTopLine /*=-1*/,
4106 int nBottomLine /*= -1*/)
4107{
4108 CMergeDoc *pDoc = GetDocument();
4109 if (pDoc == nullptr)
4110 return;
4111
4112 CLocationView *pLocationView = pDoc->GetLocationView();
4113
4114 if (pLocationView != nullptr && IsWindow(pLocationView->GetSafeHwnd()))
4115 {
4116 pLocationView->UpdateVisiblePos(nTopLine, nBottomLine);
4117 }
4118}
4119
4120/**
4121 * @brief Enable/Disable view's selection margins.

Callers

nothing calls this directly

Calls 2

GetLocationViewMethod · 0.80
UpdateVisiblePosMethod · 0.80

Tested by

no test coverage detected