Situational thread-sensitive Progress Bar visibility bug in TaskProgressView? (easy fix)

12 views
Skip to first unread message

Mark Schmieder

unread,
Mar 31, 2023, 11:48:52 PM3/31/23
to ControlsFX
I don't think this has been discussed, but I may not be super yet at how to search the list.

I came across an issue a number of years ago with TaskProgressView, where the progress bar can disappear after a few back-to-back invocations due apparently to some bizarre threading issue (seen in the debugger but difficult to pinpoint the cause; possibly due to how ListView works).

I made a two-line fix at the time, and will propose this as a pull unless someone says it's not an issue. The two specific lines I added are in the updateItem() override of TaskProgressView, after the progress bar's progress property binding is set:

progressBar.visibleProperty().bind( item.runningProperty() );

progressBar.disableProperty().bind( Bindings.not( item.runningProperty() ) );


Basically, it appears that we need to explicitly bind Progress Bar enablement and visibility to the task running status.

My apologies for being late to the game; I have several isolated changes I need to finally formally discuss, propose, and contribute as pull requests, but the pandemic set me behind several years on my open source duties.

Having reviewed the current ControlsFX repository, I do not see any differences in what a merge entails vs. my JDK8 branch (I mostly use ControlsFX 8.40.16 and 8.40.18).

Felipe Aumann

unread,
Apr 1, 2023, 12:04:04 AM4/1/23
to ControlsFX
outstanding, thanks a lot for the contribution!

Mark Schmieder

unread,
Apr 1, 2023, 12:04:07 AM4/1/23
to ControlsFX
I can't find a way to edit an existing post. 

Of course, the edits to updateItem() are not in TaskProgressView but rather the TaskCell inner class of TaskProgressViewSkin.

Sorry for not catching that while proof-reading my initial post.

Reply all
Reply to author
Forward
0 new messages