[Bug]: Preset file path selection is not propagated back to Main #8

Closed
opened 2026-04-17 11:32:10 +00:00 by tgohle · 1 comment
Owner

Problem

Changing the preset file in PresetsTab._open_file() updates the label in the tab, but does not update Main.preset_path.

Why this is a bug

The UI suggests that a new preset file was selected, but the actual reload path in Main.refresh_presets_view() still uses the old self.preset_path.

That means the signal/slot chain is incomplete and the selected file path is not actually applied.

Fix approach

Add a signal such as:

path_changed = QtCore.pyqtSignal(str)

from PresetsTab, emit the selected path, and update Main.preset_path in a connected slot.

Status

Still open.
Not fixed in the current v0.2 working copy.

### Problem Changing the preset file in `PresetsTab._open_file()` updates the label in the tab, but does not update `Main.preset_path`. ### Why this is a bug The UI suggests that a new preset file was selected, but the actual reload path in `Main.refresh_presets_view()` still uses the old `self.preset_path`. That means the signal/slot chain is incomplete and the selected file path is not actually applied. ### Fix approach Add a signal such as: ```python path_changed = QtCore.pyqtSignal(str) ``` from `PresetsTab`, emit the selected path, and update `Main.preset_path` in a connected slot. ### Status Still open. Not fixed in the current v0.2 working copy.
tgohle added the
area/presets
kind
bug
1
severity
medium
2
state
confirmed
2
labels 2026-04-17 11:46:23 +00:00
tgohle self-assigned this 2026-04-17 12:09:17 +00:00
tgohle changed title from Preset file path selection is not propagated back to Main to [Bug]: Preset file path selection is not propagated back to Main 2026-04-18 11:18:50 +00:00
Author
Owner

Patched file:
SDG2042X_V0.2.4.py

What was changed:

  • added path_changed = QtCore.pyqtSignal(str) in PresetsTab
  • emit that signal from _open_file()
  • connected t_presets.path_changed to a new Main.on_preset_path_changed()
  • connected t_presets.view_refresh to Main.refresh_presets_view()
  • made refresh_presets_view() update the visible path label from the actual active self.preset_path

Additional fix during Bug #8 work:

The first patch only propagated the selected preset file path back to Main, but the preset-name save path was still incomplete. PresetsTab._save_names() emitted rename_slot, while Main.on_rename_slot() existed but was not connected in the main-window wiring. As a result, edited slot names in the Presets tab were not written back to the selected preset file.

This was corrected in v0.2.5 by wiring t_presets.rename_slot to Main.on_rename_slot(). Manual test passed: after selecting a different preset file, editing a slot name, saving, and reloading, the SLOTx_NAME= entry is now correctly updated in the active file.

Patched file: SDG2042X_V0.2.4.py What was changed: - added path_changed = QtCore.pyqtSignal(str) in PresetsTab - emit that signal from _open_file() - connected t_presets.path_changed to a new Main.on_preset_path_changed() - connected t_presets.view_refresh to Main.refresh_presets_view() - made refresh_presets_view() update the visible path label from the actual active self.preset_path Additional fix during Bug #8 work: The first patch only propagated the selected preset file path back to `Main`, but the preset-name save path was still incomplete. `PresetsTab._save_names()` emitted `rename_slot`, while `Main.on_rename_slot()` existed but was not connected in the main-window wiring. As a result, edited slot names in the Presets tab were not written back to the selected preset file. This was corrected in v0.2.5 by wiring `t_presets.rename_slot` to `Main.on_rename_slot()`. Manual test passed: after selecting a different preset file, editing a slot name, saving, and reloading, the `SLOTx_NAME=` entry is now correctly updated in the active file.
tgohle added this to the Close all Bugs higer or equal "Medium" milestone 2026-04-20 12:37:34 +00:00
Sign in to join this conversation.
No description provided.