| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Before, when an absolute path was used, this resulted in a crash when loading GUI from a different directory. (Rescaling the icon when it is null). This is fixed by making the path relative and also adding a null-check.
|
Could we use importlib.resources ? I think it is more standard/robust but otherwise this is fine |
Sorry, something went wrong.
There was a problem hiding this comment.
I think this would be best moving forward, lmk @deruyter92
Sorry, something went wrong.
Co-authored-by: Cyril Achard <cyril.achard@alumni.epfl.ch>
| Back | FazBrowse Home | New Git URL |
This PR addresses a small issue regarding the scaling of the GUI icon pixmap in window.py.
The hardcoded path:
pixmap = QPixmap(f"deeplabcut/gui/media/dlc-{engine}.png")fails when the GUI is launched from any directory other than the project root, causing QPixmap to return a null pixmap. When scaled() is then called on this null pixmap, Qt raises an error.
This is now fixed by using a relative path and a null-check for the pixmap.