openlcb / OpenLCB_Java

A git-managed copy of the SVN-based Java prototype implementation of OpenLCB. This implementation operates inside JMRI.
6 stars 9 forks source link

CDI pane cannot be opened again after closing the CDI pane #11

Closed heikens closed 7 years ago

heikens commented 7 years ago

@balazsracz Opening the CDI pane can only be done once. After closing the CDI pane it cannot be opened again in the same session.

balazsracz commented 7 years ago

Could you please post exact reproduction instructions? (I'm not sure what you mean by "pane" for example). Sequence on where to click and what you experienced. Also post log from the jmri log window please.

Thanks Balazs

Sent from my mobile device

heikens commented 7 years ago

Reproduction instructions:

heikens commented 7 years ago

Nothing appears in the jmri log during the last 3 actions from previous comment. Now select another node, then re-select the non-responsive node does re-open the CDI. Should it work that way?

Thanks, Rob

pabender commented 7 years ago

Rob,

On Thu, Oct 27, 2016 at 11:53 AM, Rob Heikens notifications@github.com wrote:

Nothing appears in the jmri log during the last 3 actions from previous comment. Now select another node, then re-select the non-responsive node does re-open the CDI. Should it work that way?

It isn't supposed to work that way.

I haven't noticed this exact behavior, and I've been busy with other things the last couple of weeks, so I haven't had a chance to dig into this again.

I don't know if the new code fixes this or not, but there was an issue with partial loads of data that was resolved by the same select another node and then select the original.

Paul

balazsracz commented 7 years ago

I checked this. The problem is that the TreePane is abused in trying to make the individual lines act as "button"s, but the only callback that is available is fired when the selection changes.

Thus the customer needs to click on any other line and then can come back and click CDI again, but it is correct that right now clicking CDI when it is already highlighted has no effect.

There is a quick fix in clearing the selection immediately. The side effect of this fix however is that the user gets no visual feedback that their click has actually happened. This is a problem since we do not have a progress bar while we are loading the CDI.xml and it takes quite a bit of time usually.

I'll attach my fix here and you can comment on whether we should merge it or not.

balazsracz commented 7 years ago

I'm not sure how to associate a pull request with an issue.

https://github.com/openlcb/OpenLCB_Java/pull/12

heikens commented 7 years ago

The workaround is fine with me until we have some sort of progress bar in place. I prefer to be able to reselect the CDI from the TreePane directly without having to click something else first.

Thanks, Rob