void scenePanel_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
{
System.Diagnostics.Debug.Assert(mainFrm != null);
mainFrm.ScenePanel.Focus();
GraphicViewManager.Instance.SetActiveViewFromPoint(e.X, e.Y);
if (e.Button == MouseButtons.Middle)
{
lastViewCmd = viewCmd;
if (Control.ModifierKeys == Keys.Control)
Execute("rotate");
else
Execute("pan");
}
if (viewCmd != null)
{
if (viewCmd != SelectionCommand)
mainFrm.ScenePanel.Capture = true;
// If animating, don't allow Selection
if (viewCmd != SelectionCommand || !GraphicViewManager.Instance.ActiveView.ModelRenderer.RenderOptions.ShowAnimated)
{
viewCmd.ButtonDown(GraphicViewManager.Instance.ActiveView, e);
mainFrm.ScenePanel.Cursor = viewCmd.Cursor;
}
}
}