Skip to content

Fix custom file crash and contrast not updating custom model#197

Merged
StephenNneji merged 1 commit intoRascalSoftware:mainfrom
StephenNneji:fix_custom_file_bug
Feb 4, 2026
Merged

Fix custom file crash and contrast not updating custom model#197
StephenNneji merged 1 commit intoRascalSoftware:mainfrom
StephenNneji:fix_custom_file_bug

Conversation

@StephenNneji
Copy link
Contributor

@StephenNneji StephenNneji commented Feb 4, 2026

Fixes #196
Fixes #193
Fixes #168

  • Adding or deleting a custom file should now reflect in the contrast model dropdown

  • The crash in issue Changing custom file causes crashing and is quite difficult #193 happened on this line

    func_names = self.widget.model.func_names[
    and was caused by how QT handled paths on windows. The file dialog path would be "c://file.m" but the ratapi path would be "c:/file.m" which led to a KeyError in the dictionary. I fixed by using as_posix to unify path style and used dict.get so None is returned if path is not found.

  • I did some refactor so the full path of the custom file does not show up in the table anymore but in a tooltip when the user hovers over the filename cell, hopefully more readable?

Screenshot 2026-02-04 122352

Copy link
Collaborator

@DrPaulSharp DrPaulSharp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All works as expected.

@StephenNneji StephenNneji merged commit b9a4fa0 into RascalSoftware:main Feb 4, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants