Open rjbourne opened 3 years ago
The issue also effects the Image Viewer and File Converter tools - which also open a file dialogue without the additional options. Again either reverting commit 4cda4d5415bcc2f4635cd67d9c10842e57039b3d or adding the additional options resolves the issue. Since the option which has an effect is QtWidgets.QFileDialog.DontUseNativeDialog
I would guess that some optional option/setting in the default windows dialogue box causes the issue - and using the widget-based alternative removes this. Exactly how this is affected by the changes in 4cda4d5415bcc2f4635cd67d9c10842e57039b3d I do not know.
Could this be related to https://github.com/SasView/sasview/issues/1866?
Could indeed be the same issue, at least the symptoms look similar.
Indeed and the fix was exactly the fix that rjbourne says works. Has anybody actually applied those options to the two areas discussed here?
The PR has been merged, however becuase of potential issue in Image Viewer and File Converter we are not closing this ticket. We may want to move to 5.1 though?
Specifically, the code snippet used for the general scattering calculator in #2015 should also be applied appropriately in Image Viewer and File Converter.
When loading files into the generic scattering calculator the file selection dialogue appears to lag, for example a delay in displaying which file is being hovered over with the mouse. This does not appear to be related to the recent changes to the generic scattering calculator, as I can replicate the issue on branches derived from older commits prior to the merge of their PRs. The oldest commit I can replicate the issue on is commit https://github.com/SasView/sasview/commit/4cda4d5415bcc2f4635cd67d9c10842e57039b3d, and reverting this commit also appears to prevent the issue. Additionally this lag did not appear on my old laptop - suggesting it may be dependent on the computer or setup of the environment in some way.
Other file loading dialogues in Sasview pass the additional argument
options=QtWidgets.QFileDialog.DontUseNativeDialog | QtWidgets.QFileDialog.DontUseCustomDirectoryIcons
, and adding this argument to the generic scattering calculator file dialog (see branch https://github.com/SasView/sasview/tree/file-loading-lag) also appears to resolve the issue. Exactly what is occurring here to cause the lag I am unsure.