Open Adamtk22 opened 2 years ago
I noticed this bug too but I wasn't able to consistently reproduce it.
This issue can be fixed by removing _update_file_list_view from _action_open_segmentation folder This change would not affect the intended behavior since opening segmentations should not interfere with the image folder list
See the commit below https://github.com/Adamtk22/NIfTI-gridview-dev/commit/c7be7d73eef13a0be8f9ab12f1b8f01bc87acb58
That line will gray out images without a segmentation to display. I.e., if you open a folder of images and then a segmentation folder only with 10 of 100 cases segmented, it will gray out the 90 cases without the segmentation. I did this because I didn't write the escape in grid generation how to handle it when the segmentation is not found. Also, its more convenient to locate the cases with segmentation. So I would like to keep that line. Perhaps add a refresh after loading the segmentation folders will solve this issue.
I had another look at _update_file_list_view. Maybe the method could be split into two so that updating list item flags would not require a refilling of the list or some checks could be added into the method to determine if the list is to be refilled
See if this implementation is satisfactory https://github.com/Adamtk22/NIfTI-gridview-dev/commit/bc2487b25526ee05ab215f6256e84a9395b048a5
Image display data refuses to update when an image is opened with segmentation. The image must be reselected in the 'Files' tab in order to allow display data to be updated.
Image file is deselected after loading segmentation
Steps to reproduce
This line in mainwindow.py partially contributes to this issue