Skip to content
This repository was archived by the owner on Nov 19, 2020. It is now read-only.
This repository was archived by the owner on Nov 19, 2020. It is now read-only.

Wrong status text in ImageView from DebugVisualizer #897

@fdncred

Description

@fdncred

What would you like to submit? (put an 'x' inside the bracket that applies)

  • question
  • bug report
  • feature request

Issue description
I found a bug that I was trying to fix in the DebugVisualizer but I cannot open the Solution or CSProj in VS2017 in order to fix it. So, I can't compile my fix.

For what it's worth, I think this is the fix in ImageView.cs like 232. If you zoom in, the X,Y position is wrong in the status strip. Untested code below.

    private void pbPreview_MouseMove(object sender, MouseEventArgs e)
    {
        if (e.Button == MouseButtons.Left && (pMain.HorizontalScroll.Visible || pMain.VerticalScroll.Visible))
        {
            System.Drawing.Point scrollOffset = new System.Drawing.Point(e.X - dragStartPosition.X, e.Y - dragStartPosition.Y);
            pMain.AutoScrollPosition = new System.Drawing.Point(-pMain.AutoScrollPosition.X - scrollOffset.X, -pMain.AutoScrollPosition.Y - scrollOffset.Y);
        }

        tsslX.Text = $"X: {e.X / Zoom}";
        tsslY.Text = $"Y: {e.Y / Zoom}";
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions