Bug #10236
Side label for a widget isn't displayed when parent frame is defined using n DOWN, where n > 1
100%
History
#1 Updated by Delia Mitric about 1 year ago
Here is a testcase:
define var fil1 as character format "x(40)"
view-as fill-in
size 40 by 1
label "here".
define var edit1 as character
view-as editor
size 20 by 10
label "edit".
define frame fmain
fil1 at row 1 col 5
edit1 at row 2 col 10
WITH SIDE-LABELS 5 DOWN.
enable all with frame fmain.
wait-for close of current-window.
Progress:
FWD:

#3 Updated by Delia Mitric 10 months ago
- % Done changed from 0 to 10
- Status changed from New to WIP
I've minimized the testcase:
define var fil1 as character format "x(40)"
view-as fill-in
size 40 by 1
label "here".
define frame fmain
fil1 at row 1 col 5
WITH SIDE-LABELS 5 DOWN.
enable all with frame fmain.
wait-for close of current-window.
The issue seems to come from Frame.drawDownFrame:
if (widget instanceof LabeledWidget && isSideLabels())
{
LabeledWidget<O> lw = (LabeledWidget<O>) widget;
if (!lw.isNoLabels() &&
lw.getLabelInstance() != null &&
(isChui || widget.getState() != ScreenBuffer.UNINITIALIZED))
{
// TODO: in ChUI, down frame doesn't draw side-labels with the SB.UNINT code on
lw.getLabelInstance().draw();
needSync = true;
}
}
When the state of the widget is compared with ScreenBuffer.UNINITIALIZED. The state of the widget (FILL-IN) at the moment of drawing is 1 (equal to ScreenBuffer.UNINITIALIZED). That's why LabelGuiImpl.draw() is not called.
I've also checked the case which works normal (with FRAME ... 1 DOWN) and the state of the the FILL-IN at the moment of drawing of the label is 1 (equal to ScreenBuffer.UNINITIALIZED).
#4 Updated by Delia Mitric 10 months ago
- % Done changed from 10 to 20
Constantin, I've noticed that you worked on that method. Can you please explain why it is necessary to check this: (isChui || widget.getState() != ScreenBuffer.UNINITIALIZED)? Maybe you have a testcase?
Without this condition, the label is displayed both in ChUI and GUI without any problems.
#5 Updated by Constantin Asofiei 10 months ago
How is this working in ChUI in FWD?
#7 Updated by Delia Mitric 9 months ago
- Status changed from WIP to Review
- % Done changed from 20 to 100
- reviewer Hynek Cihlar added
I've committed a fix for this issue to 10236a rev. 16249
Modified Frame.drawDownFrame() in order to draw the labels for the widgets which have a label, even if their state (in GUI) is UNINITIALIZED.
Now, in both GUI and ChUI, the side-labels are displayed.
Hynek, can you review, please ? Thank you! :)
#8 Updated by Hynek Cihlar 9 months ago
- % Done changed from 100 to 90
Code review 10236a. The change looks ok to me. Just please remove the TODO, it is redundant now.
#11 Updated by Hynek Cihlar 8 months ago
- Status changed from Review to Internal Test
#13 Updated by Razvan-Nicolae Chichirau 8 months ago
ChUI regression tests passed for 10236a.
#15 Updated by Delia Mitric 7 months ago
Delia Mitric wrote:
What I'll do:
- smoke testing on a GUI Customer app (+ CHUI)
I'll talk with Razvan for ChUI tests and with Serban for smoke testing on another GUI Customer app.
No regressions found during smoke testing on another Customer app (GUI + ChUI).
Testing is done.
I think this is ready to be merged
#16 Updated by Delia Mitric 6 months ago
Delia Mitric wrote:
Delia Mitric wrote:
What I'll do:
- smoke testing on a GUI Customer app (+ CHUI)
I'll talk with Razvan for ChUI tests and with Serban for smoke testing on another GUI Customer app.
No regressions found during smoke testing on another Customer app (GUI + ChUI).
Testing is done.
I think this is ready to be merged
Just a reminder :)
#17 Updated by Radu Apetrii 6 months ago
- Status changed from Internal Test to Merge Pending
Right, things look good. 10236a can be merged right now.
--------- ChUI: 
--------- ChUI: 