Closed DiamondJim87 closed 10 months ago
This sounds fine to me, especially if the behavior is inconsistent between slice types. There was a goal to have the initial position be close to the sliced plot, but I agree that additional events it receives should not move it from its current position. If there is a stack of three plots, slicing each should initially locate a slice window next to each of the plots.
To clarify: both horizontal and vertical slices behave the same way. I understand and like the intent to have the slice close to the original plot -- in fact that desirable behavior doesn't work if the original plot is on a secondary display.
I think this is a problem with Java versions and window systems. There's a function "verifyVisible" which is misfiring in your case, I believe. It thinks the window is outsize of the screens, so it's fixing it for you.
Jeremy and I did this one on a zoom. The problem occurred if the displays were oriented such that one had negative coordinates.
A user has pointed out a very user un-friendly aspect of the horizontal and vertical slice tools Das provides on spectrograms if one is using multiple monitors. Suppose you have a DasCanvas with a spectrogram, and you right-click and create a horizontal slice. Then you move that slice window to a different monitor, and position it lovingly just where you want it. Now you return to the spectrogram to fine-tune which slice you are seeing. As soon as you click anywhere on the spectrogram, the whole horizontal slice window jumps back to the primary display.
I found that if I comment out the following line in HorizontalSpectrogramSlicer.showSlice( QDataSet tds, Datum xValue, Datum yValue ) (around line 488):
this behavior stops and there seem to be no ill effects from not resetting the location. If the intention here is to ensure that the slice window jumps to the top if it somehow was covered up, I would expect popupWindow.toFront() to accomplish that without changing its position.
Would this be an acceptable change? (Replacing the setLocation call with toFront()?)
A related behavior that is not so critical to change is that when the slice window first appears, it shows up on the primary display even if the spectrogram window is on some other display. If it is not difficult, it would be great if the slice would appear on whichever display the spectrogram window is shown on. But I don't know how to do that without digging a little further.