controls/DebugVariablePanel/DebugVariableGraphicViewer.py
changeset 1764 d5df428640ff
parent 1757 0de89da92ee0
child 1766 c1e5b9f19483
equal deleted inserted replaced
1763:bcc07ff2362c 1764:d5df428640ff
   582             y_data = items[1].GetData(start_tick, end_tick)
   582             y_data = items[1].GetData(start_tick, end_tick)
   583 
   583 
   584             # Search for the nearest point from mouse position
   584             # Search for the nearest point from mouse position
   585             if len(x_data) > 0 and len(y_data) > 0:
   585             if len(x_data) > 0 and len(y_data) > 0:
   586                 length = min(len(x_data), len(y_data))
   586                 length = min(len(x_data), len(y_data))
   587                 d = numpy.sqrt((x_data[:length, 1]-event.xdata) ** 2 + \
   587                 d = numpy.sqrt((x_data[:length, 1]-event.xdata) ** 2 +
   588                                (y_data[:length, 1]-event.ydata) ** 2)
   588                                (y_data[:length, 1]-event.ydata) ** 2)
   589 
   589 
   590                 # Set cursor tick to the tick of this point
   590                 # Set cursor tick to the tick of this point
   591                 cursor_tick = x_data[numpy.argmin(d), 0]
   591                 cursor_tick = x_data[numpy.argmin(d), 0]
   592 
   592