octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #60831] WindowButtonUpFcn is not always called


From: Rik
Subject: [Octave-bug-tracker] [bug #60831] WindowButtonUpFcn is not always called
Date: Mon, 28 Jun 2021 16:42:24 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.101 Safari/537.36

Update of bug #60831 (project octave):

                Category:                    None => Plotting with OpenGL   
              Item Group:                    None => Matlab Compatibility   
                  Status:                    None => Confirmed              
                 Release:                   6.1.0 => dev                    
        Operating System:       Microsoft Windows => Any                    

    _______________________________________________________

Follow-up Comment #1:

Confirmed.  Changing the Operating System to Any since this occurred on a
Linux machine running KDE, as well as the Microsoft Windows that you report. 
I've also changed the Release to "dev" because it occurs on the development
branch and will need to be fixed there.

The problem seems to be specific to uicontrol objects.  I re-wrote the first
example to use a text object and it works correctly with left and right
clicks.  Code is attached as repeat3.m and shown below.


function repeat3 (in)
  persistent ht;
  if (~nargin)
    ht = text (0.5, 0.5, '0', 'backgroundcolor', 'm', ...
               'buttondownfcn','repeat3(1)');
  else
    setappdata(gcf,'bdown',1);
    set(gcf,'WindowButtonUpFcn','setappdata(gcf,''bdown'',0);');
    while getappdata(gcf,'bdown')                            % loop until user
lets go of mouse
       incr = 1 - 2*strcmp(get(gcf,'SelectionType'),'alt');  % left/right
button goes up/down
       set(ht,'string',num2str(str2num(get(ht,'string'))+incr));
       pause(.1);
    end
  end
end



(file #51613)
    _______________________________________________________

Additional Item Attachment:

File name: repeat3.m                      Size:0 KB
    <https://file.savannah.gnu.org/file/repeat3.m?file_id=51613>



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?60831>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]