Opened 15 years ago
Closed 14 years ago
#5736 closed bug (invalid)
LayoutBug, AlignLayoutWith, SplitLayout
Reported by: | cipri | Owned by: | axeld |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | Kits/Interface Kit | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
Perhaps it's related again to BGLView (and AlignLayoutWith)
I attached source code and binary which show the bug.
Start the program, then press on "Start" (button), and then resize the SplitLayout (the bar in the middle). Drag the middle bar completely from left to right and vice versa, and you should be able to see the bug. (If the Start button is not pressed, than the resizing works correctly).
Attachments (2)
Change History (9)
by , 15 years ago
Attachment: | LayoutBug.zip added |
---|
by , 15 years ago
Attachment: | LayoutBug2.zip added |
---|
follow-up: 2 comment:1 by , 15 years ago
Priority: | low → normal |
---|---|
Version: | R1/alpha1 → R1/Development |
I think the problem is that the split view doesn't deal correctly with layout invalidations (caused by BStringView::SetText() each second) while dragging.
follow-up: 3 comment:2 by , 15 years ago
Replying to bonefish:
I think the problem is that the split view doesn't deal correctly with layout invalidations (caused by BStringView::SetText() each second) while dragging.
Perhaps, but I'm not so sure about that. In the source code, AlignLayoutWith is called two times. If one of them is uncommented, then (if I can remember correctly) it works correctly. So perhaps it is related to the alignment.
follow-up: 4 comment:3 by , 15 years ago
Replying to cipri:
Replying to bonefish:
I think the problem is that the split view doesn't deal correctly with layout invalidations (caused by BStringView::SetText() each second) while dragging.
Perhaps, but I'm not so sure about that. In the source code, AlignLayoutWith is called two times. If one of them is uncommented, then (if I can remember correctly) it works correctly. So perhaps it is related to the alignment.
sorry, I remembered it wrong :P. (it's the same, if one or two alignments). (I confused it with something similar ) In the source code, you find these two lines:
leftLayout->AlignLayoutWith( middleLayout, B_VERTICAL ); middleLayout->AlignLayoutWith( rightLayout, B_VERTICAL );
if you make a little change, and turn them into:
leftLayout->AlignLayoutWith( middleLayout, B_VERTICAL ); middleLayout->AlignLayoutWith( rightLayout, B_VERTICAL );
then the program crashes.
I think both variants should work the same fact is, that the second variant crashes the program. (and this didn't happen, before BGLView - bug (which I reported some time ago) was fixed).
follow-up: 5 comment:4 by , 15 years ago
Replying to cipri:
In the source code, you find these two lines:
leftLayout->AlignLayoutWith( middleLayout, B_VERTICAL ); middleLayout->AlignLayoutWith( rightLayout, B_VERTICAL );
if you make a little change, and turn them into:
leftLayout->AlignLayoutWith( middleLayout, B_VERTICAL ); middleLayout->AlignLayoutWith( rightLayout, B_VERTICAL );
then the program crashes.
I see no difference between those lines.
comment:5 by , 15 years ago
Replying to bonefish:
Replying to cipri:
In the source code, you find these two lines:
leftLayout->AlignLayoutWith( middleLayout, B_VERTICAL ); middleLayout->AlignLayoutWith( rightLayout, B_VERTICAL );
if you make a little change, and turn them into:
leftLayout->AlignLayoutWith( middleLayout, B_VERTICAL ); middleLayout->AlignLayoutWith( rightLayout, B_VERTICAL );
then the program crashes.
I see no difference between those lines.
sorry, I wrote two times the same. Now the correct information:
In the source (mainwindow.cpp) you find the two lines leftLayout->AlignLayoutWith( middleLayout, B_VERTICAL ); rightLayout->AlignLayoutWith( middleLayout, B_VERTICAL );
now if you change the second line from rightLayout->AlignLayoutWith( middleLayout, B_VERTICAL );
into: middleLayout->AlignLayoutWith( rightLayout, B_VERTICAL );
the program crashes and the debugger is called.
(and I think, it didn't crash before bug #5522 was fixed).
comment:6 by , 14 years ago
it seems this bug has been solved, i tried it today, and it works like it is expected. So I think it can be closed. And thank you for solving it :-)
layoutbug