-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
silx view: Fixed setting focus at startup when opening a dataset #3953
Conversation
@@ -453,9 +453,9 @@ def __createCustomNxdataWindow(self, customNxdataWidget): | |||
layout.addWidget(customNxdataWidget) | |||
return widget | |||
|
|||
def __h5FileLoaded(self, loadedH5): | |||
def __h5FileLoaded(self, loadedH5, filename): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Retrieved from Hdf5TreeModel.sigH5pyObjectLoaded
@@ -250,7 +250,6 @@ def _closeFileList(fileList): | |||
"""Static method to close explicit references to internal objects.""" | |||
_logger.debug("Clear Hdf5TreeModel") | |||
for obj in fileList: | |||
_logger.debug("Close file %s", obj.filename) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was causing issues with the tests since h5py.Dataset
do not have a filename
attribute.
self.sigH5pyObjectLoaded.emit(h5file, filename) | ||
self.insertH5pyObject(h5file, row=row, filename=filename) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure here why the signal is emitted before inserting the item into the model? 🤷
I can't really review the code, but I gave a few tries and it seems to be working. Thanks! |
This PR aims at opening the vis at startup when providing a data path along with the file to open: closes #3916
To achieve so, this PR adds an extra argument to
Hdf5TreeModel.sigH5pyObjectLoaded
in order to pass the full filename used to open the item.