bugGNU Octave - Bugs: bug #44669, SelectionType "open" for...

 
 

bug #44669: SelectionType "open" for double-click non available (Qt-only)

Submitter:  Guillaume <gyom>
Submitted:  Mon 30 Mar 2015 02:32:19 PM UTC
   
 
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Fixed Assigned to:  lostbard
Originator Name:  Guillaume Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Thu 02 Apr 2015 11:12:47 AM UTC, comment #13: 

Works great indeed. Many thanks!

Guillaume <gyom>
Wed 01 Apr 2015 08:23:07 PM UTC, comment #12: 

Verified.  Works great.  Closing report.

Rik <rik5>
Group administrator
Wed 01 Apr 2015 07:17:25 PM UTC, comment #11: 
John Donoghue <lostbard>
Group Member
Wed 01 Apr 2015 06:38:01 PM UTC, comment #10: 

This appears to fix it for the Qt issue.


(file #33506)

John Donoghue <lostbard>
Group Member
Tue 31 Mar 2015 06:38:47 PM UTC, comment #9: 

I confirm it works fine with FLTK now. Thanks!

Guillaume <gyom>
Tue 31 Mar 2015 06:20:14 PM UTC, comment #8: 

I fixed the two FLTK issues with this cset (http://hg.savannah.gnu.org/hgweb/octave/rev/91e2212b060d).

Rik <rik5>
Group administrator
Tue 31 Mar 2015 06:05:46 PM UTC, comment #7: 

The first problem, Qt double-clicks, seems relatively straightforward although there could be a lot of code duplication.  In Canvas.cc there is a routine for handling single clicks.


Canvas::canvasMousePressEvent (QMouseEvent* event)


And further on in this code there is


gh_manager::post_set (figObj.get_handle (), "selectiontype",
                      Utils::figureSelectionType (event), false);


And the prototype for figureSelectionType in QtHandlesUtils.cc is


figureSelectionType (QMouseEvent* event, bool isDoubleClick)


so it is the false in the function call that needs to be true for dobule-clicks.

Back in Canvas.cc there is a routine for double-clicks.


Canvas::canvasMouseDoubleClickEvent (QMouseEvent* event)


But it is missing most of the code from the single-click routine, including the setting of figureSelectionType.

Rik <rik5>
Group administrator
Tue 31 Mar 2015 05:21:42 PM UTC, comment #6: 

Summarizing three different problems:

1) Qt double-clicks
  When using Qt toolkit no double-click events are reported.  This is because the code itself in Canvas.cc is not processing MouseDoubleClickEvent.

2) FLTK incorrect middle button reporting
  When using FLTK, the middle mouse button is reported as "normal" instead of "extend".

3) FLTK incorrect double-right click reporting
  When using FLTK, a double-right click should produce "alt" followed by "open".

Rik <rik5>
Group administrator
Tue 31 Mar 2015 04:34:30 PM UTC, comment #5: 

For Qt, Canvas.cc posts window and buttondown fcn events for MousePressEvent, It doesn't post anything for MouseDoubleClickEvent.

John Donoghue <lostbard>
Group Member
Tue 31 Mar 2015 03:42:54 PM UTC, comment #4: 

Weirdly enough, it's still not behaving as expecting with FLTK for me (in a different way than with Qt):

  • middle-click returns 'normal'
  • double-right-click returns 'alt', 'alt'


e.g. if I do left, middle, right, double-left, double-middle, double-right, I get:


graphics_toolkit fltk
figure('ButtonDownFcn','get(gcbf,''SelectionType''),fflush(stdout);')
ans = normal
ans = normal
ans = alt
ans = normal
ans = open
ans = normal
ans = open
ans = alt
ans = alt


Guillaume <gyom>
Tue 31 Mar 2015 03:30:13 PM UTC, comment #3: 

Two independent confirmations that this is a Qt-only bug.  Since Qt is now the default it would be nice to understand why this is happening.

Rik <rik5>
Group administrator
Tue 31 Mar 2015 02:53:32 PM UTC, comment #2: 

This works for me in 4.0-rc1 with FLTK


graphics_toolkit fltk
figure('ButtonDownFcn','get(gcbf,''SelectionType''),fflush(stdout);')
ans = normal
ans = open
ans = alternate
ans = extend


Andreas Weber <andy1978>
Group Member
Mon 30 Mar 2015 03:43:50 PM UTC, comment #1: 

Confirmed.  Also, when using the FLTK toolkit (also OpenGL) it does work.


graphics_toolkit fltk
figure('ButtonDownFcn','get(gcbf,''SelectionType'')')


So, this is something with how the interaction with the Windowing system (Qt or FLTK) is coded rather than OpenGL generally.


Rik <rik5>
Group administrator
Mon 30 Mar 2015 02:32:19 PM UTC, original submission:  

A double-click triggers a single event of type "normal" in the following setting:


graphics_toolkit qt
figure('ButtonDownFcn','get(gcbf,''SelectionType'')')


while in MATLAB it triggers two succesive events, one "normal" and one "open".

Guillaume <gyom>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #33506:  fixcanvasopen.patch added by lostbard (4KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by lostbard (Posted a comment)
  • -email is unavailable- added by andy1978 (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -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 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-04-01 rik5 StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2015-04-01 lostbard Item GroupNone Matlab Compatibility
        StatusPatch Submitted Ready For Test
        Assigned toNone lostbard
    2015-04-01 lostbard Attached File- Added fixcanvasopen.patch, #33506
        StatusConfirmed Patch Submitted
    2015-03-30 rik5 StatusNone Confirmed
        SummarySelectionType &quot;open&quot; for double-click non available SelectionType "open" for double-click non available (Qt-only)

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code