bugGNU Octave - Bugs: bug #56646, SelectionType in a listbox's...

 
 

bug #56646: SelectionType in a listbox's callback

Submitter:  Guillaume <gyom>
Submitted:  Fri 19 Jul 2019 10:17:42 AM UTC
   
 
Category:  Plotting Severity:  3 - Normal
Priority:  3 - Low Item Group:  Matlab Compatibility
Status:  Confirmed Assigned to:  None
Originator Name:  Guillaume Open/Closed:  * Open
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 29 Jul 2019 10:35:20 AM UTC, comment #2: 

I agree with your comments. My main concern here is the double-click that has to return "normal", "open". Current behavior of middle-click and right-click can be left as it currently is. Keyboard input is something that can be dealt with through the "buttondownfcn" callback property so this might not be an issue either.

Guillaume <gyom>
Mon 22 Jul 2019 05:09:06 PM UTC, comment #1: 

Do we even want to follow Matlab behavior here?  It doesn't seem correct given their documentation.

uicontrol doesn't have a "SelectionType" property, only the figure object has such a property.  The documentation for figure properties at https://www.mathworks.com/help/matlab/ref/matlab.ui.figure-properties.html says "Mouse selection type, returned as 'normal', 'extend', 'alt', or 'open'. This property provides information about the last mouse button press that occurred in the figure."

Even though a middle-click occurs over a uicontrol object, it is still the last mouse button press that occurs in the figure.  Therefore, I think it should return "extend".  In the same vein, right click should return 'alt'.

Also, since it is undocumented that keyboard input should set a mouse click property, I don't think <space> or <return> should return "open".  Octave usually doesn't bother to follow undocumented Matlab behavior since it can change between versions without warning.

This still does leave three issues with uicontrol objects (and possibly other graphic objects on a figure?).

1) Double-click should return "normal", "open"
2) Middle-click should return "extended"
3) Right-click should return "alt"

I also notice a slight delay in when the callback is activated.  I'll file a different report about that.



Rik <rik5>
Group administrator
Fri 19 Jul 2019 10:17:42 AM UTC, original submission:  

In bug #44669, a bug was fixed for having "SelectionType" to return "open" for a double-click in a figure's callback.

It seems that there are similar issues in a listbox's callback where "open" is not returned for a double-click and middle/right click return "extend"/"alt":


figure
uicontrol ('style','listbox', 'string','octave', 'callback',"get(gcbf,'SelectionType')")


In Matlab, the behavior is:

  • left single click: "normal"
  • left double click: "normal", "open"
  • middle click:
  • right click:
  • space: "open"
  • "return: "open"


Guillaume <gyom>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by rik5
  • -email is unavailable- added by gyom (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-07-22 rik5 Priority5 - Normal 3 - Low
        StatusNone Confirmed
        Carbon-Copy- Added lostbard

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code