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

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

[Octave-bug-tracker] [bug #52588] Crazy Scrolling in imagesc


From: Rik
Subject: [Octave-bug-tracker] [bug #52588] Crazy Scrolling in imagesc
Date: Tue, 5 Dec 2017 13:18:51 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0

Follow-up Comment #2, bug #52588 (project octave):

Confirmed.  I agree with Pantxo that Octave should use a normal convention,
like graphics programs, for what happens when pan mode is on.

Check out the pan() command.  It is possible to set the pan mode to x-only,
y-only, or both.  The default, when the user selects pan, is for panning in
both x and y directions to be allowed.  I think what is happening is that when
the mouse wheel is used, the code checks the pan mode.  It sees that both
pan-x and pan-y are on, and so it increments both (for wheel up) which
produces a panning along the diagonal.  Probably just need a test for whether
the SHIFT key is pressed.

The code is in libgui/graphics/Canvas.cc.  The callback routine is


  Canvas::canvasWheelEvent (QWheelEvent *event)


The actual case in the switch statement is at line 982.


              case PanMode:
                {
                  axes::properties& ap = Utils::properties<axes> (axesObj);

                  double factor = (event->delta () > 0 ? 0.1 : -0.1);

                  ap.pan (mode, factor);
                }
                break;


In pseudo-code, what has to happen is


  if (NO_MODIFIER_KEY)
    {
      if (PAN_MODE includes Y-panning)  // don't y-pan if it is disabled
        ap.pan (Y-PAN MODE ENUM, factor);
    }
  else if (SHIFT_MODIFIER_KEY)
    {
      if (PAN_MODE includes X-panning)  // don't x-pan if it is disabled
        ap.pan (X-PAN MODE ENUM, factor);
    }




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?52588>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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