Webcam travel screen button labelling incorrect

Issue #350 resolved
prl created an issue

In webcam.travel section of the Webcam plugin, the coloured button labelling is incorrect.

The BLUE button hint is permanently labelled "hdkfjhg", and the button has no function. The RED prev and GREEN next buttons move back and forward through downloaded pages of feeds. Their hints have fixed labels, but the intention in the code is that their labels are hidden when they have no function. "prev" should be hidden at the start of the list of pages, and "next" should be hidden at the end of the list.

The underlying cause is that text in Buttons (and in Labels) seems to become "stuck" if the text is applied when the Button (or Label) is created in the screen's __init__(). If the text is applied then, the text is not affected by hide() and if setText() is applied to the Button (or Label), the new text overwrites the old text on the screen (both old and new text are drawn).

If the assignment of text and initial hide/show operations are delayed at least until onLayoutFinish time, they work normally.

Reproduction steps

Go to MENU>Photos>Web Cams>webcam.travel.

The BLUE button hint is permanently labelled "hdkfjhg", and the button hints for RED and GREEN are fixed, though they display the correct text. Looking at the code shows that the BLUE button hint text is intended to be permanently hidden, and the RED prev button hint text should be hidden at the start of the list and the GREEN next button hint text should be hidden at the end of the list.

Comments (3)

  1. Peter Urbanec

    Fix Bug #350 Webcam travel screen button labelling incorrect

    Move setting of button hint text and initial button hide() calls to onLayoutFinish time in screen construction so that later calls of hide() and show() work correctly. Removed spurious label "hdkfjhg" from BLUE button.

    → <<cset 82dc0aa0cb3e>>

  2. Log in to comment