Bug with the New Combobox Plugin (combobox.xml)

  • Hi,

    I noticed a small bug using the the New Combobox Plugin (combobox.xml) :
    if combobox layer are set parent of an another layer which is too close to the border screen, the combobox does not open entirely :(

    You can figure out of the problem by simply adding this code to the combobox-examples.xml (from example folder of krpano-1.19-pr14)

    Code
    <action name="comboboxexamples" autorun="onstart">
    loadscene(0);
    set(layer[cbsettings].parent,top_combobox_container);
    set(layer[cbscenes].parent,bottom_combobox_container);
    </action>
    
    
    <layer name="top_combobox_container" type="container" align="righttop"   y="0" keep="true" >  </layer>
    <layer name="bottom_combobox_container" type="container" align="leftbottom" y="0"  keep="true" >  </layer>

    By increasing 'y' value up to ~150 or setting to align="right" or align="left" for the container layers, the combobox open again correctly...
    I assume a bug in the actions that 'find the available screen space above or below the combobox' in combobox.xml... but i'm not able to fix it.

  • I did not really find a good fix, but I realize that removing a part of the code in 'combobox.xml', it seems to work correctly when combobox layers are set parent of an another layer.

    There is the part to remove (line 420 to 442):

    I know it is a bad fix because this removed part could probably induces other problems in other situations *unsure*

  • Hi)

    I took a look at it and it seems that if you change the line 425

    Code
    sub(openheight, max_overflow);

    to

    Code
    if(max_overflow LE 0, sub(openheight, max_overflow); );

    it works fine. Anyway, it seems better not to remove the whole code part (not the best practice, because it may influence some other usage cases).


    Regards,

    Alexey

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!