bugGNU Octave - Bugs: bug #53315, Redundant conditional test in...

 
 

bug #53315: Redundant conditional test in HoverToolButton::eventFilter of variable editor

Submitter:  Dan Sebald <sebald>
Submitted:  Sat 10 Mar 2018 10:32:49 AM UTC
 
Category:  GUI Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Other
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       

 

Fri 13 Apr 2018 04:57:31 AM UTC, comment #2: 

I removed the redundant test here (http://hg.savannah.gnu.org/hgweb/octave/rev/565d724ecf50).

Marking as fixed and closing report.

Rik <rik5>
Project Administrator
Mon 12 Mar 2018 09:57:17 PM UTC, comment #1: 

There is an enumerated double-click event, QEvent::MouseButtonDblClick.

But why would that cause a right-click context menu to appear?  If I try a double right-click in Firefox, for example, the second click just closes the context menu back down without selecting anything.

Rik <rik5>
Project Administrator
Sat 10 Mar 2018 10:32:49 AM UTC, original submission:  

I just noticed in the code:

  bool HoverToolButton::eventFilter (QObject *obj, QEvent *ev)
  {
    if (ev->type () == QEvent::HoverEnter)
      emit hovered_signal ();
    else if (ev->type () == QEvent::MouseButtonPress ||
             ev->type () == QEvent::MouseButtonPress)
      emit popup_shown_signal ();

    return QToolButton::eventFilter (obj, ev);
  }

has a redundant test for MouseButtonPress.  I can't recall what I was thinking at the time, but I'll look at this again at some point.  The hover tool button is the graph button that pops up a context menu.  Maybe I was thinking the second one should be "mouse double click" whatever expression is defined for that event.

Dan Sebald <sebald>

 

(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 sebald (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 project members can vote.

     

     

     

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-04-13 rik5 StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.10