Menu

#1283 zoom level affects vslider output range

v0.47
closed-fixed
nobody
None
5
2018-10-08
2017-01-15
No

Steps to reproduce:

  1. create a new patch window
  2. create a vslider
  3. create a number box connected from the vslider
  4. verify that vslider ranges from 0 to 127
  5. select zoom in menu option
  6. notice that vslider now ranges from 0 to 255

Conclusion: vslider output range depends on zoom level, which is probably not intended.

I tested on:

$ pd -version
Pd-0.47.1 ("") compiled for Debian (0.47.1-3) on 2016/11/28 at 20:56:10 UTC

(Bug originally reported by a Win10 user in #dataflow)

Discussion

  • electrickery

    electrickery - 2017-01-16

    Late November I posted a patch on pd-dev solving most zoom issues with iemgui objects, but the solution might not fit the desired structure. Even so it cleaned up the code somewhat.
    Addendum: While testing I found that vslider (and hslider) get a drag offset when you drag beyond the begin/end points and back, only in zoomed mode.

     

    Last edit: electrickery 2017-01-17
  • electrickery

    electrickery - 2017-02-03

    This is the improved patch. It tries to solve all zoom issues within the current Pd objects. It turned out to be quite evasive as refactoring helped clarifying the intention of the code. The changes could be applied with minimal change, but this would compromise code readability.
    The affected files are:
    src/g_all_guis.c
    src/g_all_guis.h
    src/g_bang.c
    src/g_hdial.c
    src/g_hslider.c
    src/g_numbox.c
    src/g_text.c
    src/g_toggle.c
    src/g_vdial.c
    src/g_vslider.c
    src/g_vumeter.c

    Only one known potential problem remains; in the slider_motion functions there is code to keep track of the mouse pointer even if it is outside the object. This code worked with the original zoom-functionality, but doesn't in the patched zoom functionality. Removing it make it seem to work in all situations.

     

    Last edit: electrickery 2017-02-03
  • Anonymous

    Anonymous - 2017-10-24

    I can confirm this bug. Also, when creating GUI objects when zoomed, the following are created at normal size instead of zoom sized and then shrink when you zoom out to smaller than normal: vslider, hslider, bng, vradio, hradio, and the "size" of canvas. Vu meter gets really weird when you create it while zoomed in. Arrays don't scale at all. This is intensional?

     
  • Anonymous

    Anonymous - 2017-10-24

    Adding to my previous post. I misunderstood the bug report and assumed it was the same as my problem. The GUI objects are actually scaling wrong and then halving their max numbers when created zoomed in. Maybe, these are related?

     
  • Miller Puckette

    Miller Puckette - 2017-12-03

    I believe it's fixed in github 0.48-1 branch.

     
  • IOhannes m zmölnig

    • status: open --> closed-fixed
     

Anonymous
Anonymous

Add attachments
Cancel