bugGNU Octave - Bugs: bug #45621, Bar does not execute ButtonDownFcn

 
 

bug #45621: Bar does not execute ButtonDownFcn

Submitter:  None
Submitted:  Sat 25 Jul 2015 12:35:54 AM UTC
   
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Assigned to:  None
Originator Name:  Lars Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 4.0.0
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sun 27 Sep 2015 07:26:13 PM UTC, comment #6: 

I pushed the patch on stable:

http://hg.savannah.gnu.org/hgweb/octave/rev/7d7c91ddc736

Closing report.

Pantxo Diribarne <pantxo>
Group Member
Sun 23 Aug 2015 08:02:06 PM UTC, comment #5: 

Thanks John, I attached a patch: if an object is clicked and its parent is a hggroup, the parent "buttondownfcn" is executed if the object itself has an empty "buttondownfcn".



(file #34707)

Pantxo Diribarne <pantxo>
Group Member
Thu 30 Jul 2015 12:16:37 PM UTC, comment #4: 

For comment 1, using matlab R2010b:


>> hbars = bar (rand (3), 'buttondownfcn','disp Bar')

hbars =

  174.0016  177.0011  179.0011

>> strcmp (get (hbars, 'buttondownfcn'), 'disp Bar')

ans =

     1
     1
     1

>> hkids = get (hbars(1), 'children')

hkids =

  175.0011
>> strcmp (get (hkids(1), 'buttondownfcn'), 'disp Bar')

ans =

     0
>>


John Donoghue <lostbard>
Group Member
Tue 28 Jul 2015 02:17:58 AM UTC, comment #3: 

sorry, no MATLAB available to check it...
But clicking the bars works fine when using the fltk toolkit.
Only Qt has the problem. So I assume it should be propagated indeed...

Anonymous
Sat 25 Jul 2015 04:04:46 PM UTC, comment #2: 

I forgot, if the fix is to propagate the "buttondownfcn" of hggroups to their children, there are many functions that could use that same fix. I see at least: rectangle.m, _contour_.m, _bar_.m, _quiver_.m, _stem_.m, _errplot_.m, _scatter_.m, area.m, stairs.m

I didn't change the bug category "plotting" even though I doubt gnuplot will ever handle this property

 

Pantxo Diribarne <pantxo>
Group Member
Sat 25 Jul 2015 01:15:57 PM UTC, comment #1: 

Thanks for your bug report. It would be easy to attribute the same "buttondownfcn"  to all the hggroup objects that are created by bar.m and their children, but how does Matlab behave? Do you have Matlab at hand? If so can you check what the following script returns?


figure ()
hbars = bar (rand (3), "buttondownfcn","disp Bar")
strcmp (get (hbars, "buttondownfcn"), "disp Bar")
hkids = get (hbars(1), "children")
strcmp (get (hkids(1), "buttondownfcn"), "disp Bar")


In octave all hggroups inherit the "buttondownfcn" property but not their actual children objects. Hence the selection mechanism doesn't trigger any action.

Pantxo Diribarne <pantxo>
Group Member
Sat 25 Jul 2015 12:35:54 AM UTC, original submission:  

%Buttondownfcn does not work in a bar graph
%But has no problem in a normal plot

x=1:10

figure(1)
plot(x,"buttondownfcn","disp Clicking_The_Line_is_Fine")

figure(2)
bar(x,"buttondownfcn","disp But_Not_The_Bar")

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #34707:  fix_qt_btndown.patch added by pantxo (2KiB - text/x-diff)

 

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 pantxo (Posted a comment)
  • -email is unavailable- added by None (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 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-09-27 pantxo StatusPatch Submitted Fixed
        Open/ClosedOpen Closed
    2015-08-23 pantxo Attached File- Added fix_qt_btndown.patch, #34707
        CategoryPlotting Plotting with OpenGL
        StatusNeed Info Patch Submitted
    2015-07-25 pantxo StatusNone Need Info
        Operating SystemMicrosoft Windows Any

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code