RFR: 8252236: TabPane: must keep header of selected tab visible [v2]
Ambarish Rapte
arapte at openjdk.java.net
Thu Sep 24 07:11:33 UTC 2020
On Wed, 23 Sep 2020 08:39:32 GMT, Jeanette Winzenburg <fastegal at openjdk.org> wrote:
>> modules/javafx.controls/src/main/java/javafx/scene/control/skin/TabPaneSkin.java line 855:
>>
>>> 853: } else {
>>> 854: }
>>> 855: validateScrollOffset();
>>
>> This seems to be an unintended change. If so please revert.
>
> good eye :) Forgot to remove the empty else block.
>
> Validate must be called always if the tabs are not fitting: needed if the last tab (in the list) is visible and we
> remove tabs from the end. Without, the now last tab is not kept glued to the trailing edge. There are two tests
> covering the corner case (testRemoveXXLast) which fail if we don't. Question is if that should be mentioned in a code
> comment? Personally, I tend to just delete the empty block.
Thanks, I confirmed that it is a needed change. I think, a comment will be useful here, as the problem that is solved
by this change is not very vivid from source.
-------------
PR: https://git.openjdk.java.net/jfx/pull/300
More information about the openjfx-dev
mailing list