Skip to content

Crashes when updating the postion in the status bar #11

@praveenivp

Description

@praveenivp

Here is the error I got:

Index in position 1 is invalid. Array indices must be positive integers or logical values.
Error in asCursorPosClass/setPosition (line 236)
obj.setPosText([posY, posX],img(posY,posX));
Error in arrShow/updFig (line 3607)
obj.cursor.setPosition(obj.cursor.getPosition(),true);
Error in arrShow/fpResize (line 3374)
obj.updFig;
Error in arrShow>@(src,evnt)obj.fpResize (line 533)
'ResizeFcn',@(src, evnt)obj.fpResize);
Error while evaluating Figure SizeChangedFcn.

The posY is zero when the error occurs. However, the source of the error is in arrShow.m(line 4066). rounding values<1 yields 0. Could you you ceil() instead of round()?

                   ' if arrShow.mouseInsideAxes(position, currAxes);'
                       ' x = round(position(1,1));'
                        'y = round(position(1,2));'
                        'obj.cursor.setPosition([y,x],false);'
                        'break;'
                   'end'

Thank you very much for this toolboox:)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions