Skip to content

Display of pixel row/col by clicking in ND-window not functioning properly #40

@tboggs

Description

@tboggs

When clicking on a pixel with CTRL+SHIFT in the ND-window display (after calling view_nd), the following exception is raised:

Traceback (most recent call last):
  File "/home/thomas/src/spectral/spectral/graphics/ndwindow.py", line 93, in left_down
    self.window.canvas.SetCurrent(self.canvas.context)
AttributeError: MouseHandler instance has no attribute 'canvas'

This is due not accessing the window canvas properly (should be self.window.canvas).

Furthermore, the pixel coordinate returned incorrectly has a floating point row value (should be int):

Pixel 10264 (70.786206896551718, 114) has class 0.

This was likely introduced when the file began using true division (by importing division from __future__).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions