Skip to content

GUI fixes (config editor + reload timer) - #3441

Draft
deruyter92 wants to merge 3 commits into
mainfrom
jaap/gui-config-editor-helper
Draft

GUI fixes (config editor + reload timer)#3441
deruyter92 wants to merge 3 commits into
mainfrom
jaap/gui-config-editor-helper

Conversation

@deruyter92

Copy link
Copy Markdown
Collaborator

Summary

Fix pathlib coercion & centralize editor opening

  • Move duplicated config-editor logic from five tabs into DefaultTab._open_config_editor() and open_project_config_editor().
  • After the pathlib migration, opening Edit config.yaml in the GUI raised TypeError because DictViewer passed a Path to QLabel, which only accepts str. This PR fixes that crash and consolidates how tabs open the YAML editor.

Deduplicate deferred reload timer

  • ManageProject and AnalyzeVideos each owned an identical single-shot QTimer to defer reload_project_config until
    after the config editor closed. That logic now lives on DefaultTab and is connected only when editing the project config.yaml (reload_project=True). Editing pose/inference configs still does not schedule a reload.

DictViewer passes the config path straight to QLabel, which only accepts
str. Since the pathlib migration ConfigEditor hands it a Path, so opening
"Edit config.yaml" raises TypeError. Reproduced on PySide6 6.7.3 and 6.9.3;
it went unnoticed because the GUI tests are skipped where PySide6 is absent.
The deferred reload timer was duplicated in ManageProject and AnalyzeVideos,
and each of the five tabs opened ConfigEditor slightly differently. They now
share DefaultTab._open_config_editor, which keeps the dialog referenced and
parents it to the main window.

That fixes two latent bugs in the pose_cfg / inference_cfg tabs, where the
dialog was a bare local: nothing kept it alive after the method returned, and
without a parent ConfigEditor skipped its screen-relative sizing. Only the
project config asks for a reload, since rebuilding the tabs is wrong for the
other files.
Cover the dialog outliving the call that opened it, the single deferred
reload after saving the project config, the absence of a reload for any other
config, and the no-op when no project is loaded.
@C-Achard C-Achard added GUI issues relating to GUI config Related to config.yaml, ruamel, YAML parsing, ... labels Aug 13, 2026

@C-Achard C-Achard left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Great changes, thank you!

@C-Achard C-Achard added this to the v3.0.2 milestone Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

config Related to config.yaml, ruamel, YAML parsing, ... GUI issues relating to GUI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants