protected override void OnMouseDown(MouseEventArgs e)
{
// The base method does this too, but some paths in this method don't go through the base!
RemoveContextButtonIfPresent();
if (e.Button == MouseButtons.Right)
{
base.OnMouseDown(e);
return;
}
if (m_rootb == null || DataUpdateMonitor.IsUpdateInProgress())
return;
// Convert to box coords and see what selection it produces.
Point pt;
Rectangle rcSrcRoot;
Rectangle rcDstRoot;
using (new HoldGraphics(this))
{
pt = PixelToView(new Point(e.X, e.Y));
GetCoordRects(out rcSrcRoot, out rcDstRoot);
#if __MonoCS__
// Adjust the destination to the original scroll position. This completes
// the fix for FWNX-794/851.
rcDstRoot.Location = m_ptScrollPos;
#endif
IVwSelection sel = RootBox.MakeSelAt(pt.X, pt.Y, rcSrcRoot, rcDstRoot, false);
if (sel == null || !HandleClickSelection(sel, false, false))
base.OnMouseDown(e);
}
}