Closed kephale closed 4 years ago
So all the syncing occurs here. Looking at the call hierarchy, it seems it gets called every time a node is added to the AWT image!! One thing I can do is to avoid syncing sciview (and reconstruction viewer for that matter) when calling updateAllViewers()
. What do you think @kephale ?
A quick fix might be to just track when all viewers were last updated, and if that time is greater than some threshold, then try to refresh sciview and/or reconstruction viewer.
Just for reference: With db9962528 and 561efba968c35a things seem really more snappier. The logic is as follows:
Also, opening multiple sciviews before the requested one opens (e.g. smashing the open sciview button) crashes the whole imagej
@kephale, one thing that ca13470cd02c does not address is that the "Open SciView Viewer" button keeps being disabled after SciView is closed, ie., the user does not have a way to re-open SciView after closing it. If a window listener is involved, quick workarounds would be: 1) Never disable the button (just display a warning if user clicks on it with viewer already being displayed) 2) Re-enable the button after displaying the dialog triggered by pressing the Sync button with SciView is closed What do you think? (let me known, I'm good at the easy stuff :smile: )
Hehe, check gitter :D
I think the easy thing is to never disable the button, but I was asking where the code for disabling the button is, then I'll take a look at it.
One more TODO: Add a command that will turn on the SciView update site and call it from SNTLoaderCmd's isSciViewAvailable
Do you want to ship SciView with Fiji? It would simplify the SNT code, no?
@ctrueden Yes, it would be good to ship SciView with Fiji soon. I'd like to do a little more testing but we should really bite the bullet and just do it soon. What sort of things should we be looking at testing?
That said, there are only a few places where we have to deal with checking update site information. A lot of the other stuff we have been dealing with in SNT is about syncing SciView and SNT.
Sync Changes
(or performing an operation triggering a sync call) will continue to sync changes to the closed SciView Viewer.. Actually buttons in the SciView panel should update after SciView is closed.