Skip to content

pop_selectevent (Edit > Select epochs or events): graphical and numerical parity with EEGLAB #731

Backlog

Description

@arnodelorme

EEGPrep checks each EEGLAB function on its own, in one issue, for both the window and the numbers (Arno, November 26, 2026). This issue is pop_selectevent, the Edit menu item "Select epochs or events", from the Edit menu report of November 26, 2026 (EEGPrep develop df89e80 against EEGLAB develop 16cc13212, jamming under Xvfb).

Findings of the report for this function
  • F15: Edit boxes and checkboxes do not line up vertically (rule 9 of the GUI rules).
  • F16: The window is taller than its content, and the text of the edit boxes is left aligned (rule 7).
  • F18: A ticked checkbox is drawn as a tick with no box. To check on the Mac.
  • F20: Field buttons show the field name, not its description.
  • F24: History: no eeg_store line after an edit in place, pop_newset shown or not, and EEGLAB writes invalid lines on Ok with nothing typed.

F15, F16, F18, F21 and F24 are shared by several windows: fix them here only for this function's window, under the GUI rules of project_eegprep (rules/gui-parity.md).

Files

Activity

  1. added
    later
    gui-parity
    on Nov 27, 2026
  2. claude commented on Nov 27, 2026

    @claude
    Contributor

    🤖 Plan:

    Research

    N16–N22 numerical tests already match, so only the dialog and history need work. The dialog is built in pop_selectevent_dialog_spec, which uses per-row geometry weights that differ by field type. That is why the edit and checkbox columns do not line up (F15). It also sets a fixed window size (F16). The history command is built without eeg_store/pop_newset handling (F24).

    Relevant code

    • pop_selectevent.py#L101-L150: per-row geometry, different weights for latency/duration, type, and other fields (F15)
    • pop_selectevent.py#L208-L210: size=(960, max(500, 210 + 34*n)) gives a window taller than its content (F16)
    • pop_selectevent.py#L217-L227: help button labeled with field, and the description only appears in its popup (F20)
    • pop_selectevent.py#L32-L66: _history_command returns a bare command; Ok with nothing typed still builds options (F24)
    • F18 (checkbox drawn as a tick with no box) and the left-aligned edit text (F16) come from the shared Qt renderer in src/eegprep/functions/guifunc/, not from this module.

    Proposed Approach (for review, not implemented)

    1. F15: use one column-weight tuple for all field rows, with edit and checkbox columns at the same weights, so the columns line up.
    2. F16: drop the fixed height and let the layout size the window. Edit-box alignment and F18 need a change in the shared renderer, which the issue scopes to this window only. That needs a decision on how to scope a renderer change to one dialog.
    3. F20: label the field button with the event-field description when EEG.eventdescription has one, and fall back to the field name, as EEGLAB does.
    4. F24: needs Arno's decision. The open question is whether to match EEGLAB, which writes invalid history lines on an empty Ok, or to return an empty command. Also open: whether the eeg_store/pop_newset lines belong in the menu callback (EEGPrepSession) rather than pop_selectevent.

    Open questions: F18 Mac check result. F24 history choice. Whether renderer-level fixes (F16 alignment, F18) may be global or must be scoped per window.

  3. suraj-ranganath commented on Nov 28, 2026

    @suraj-ranganath
    Member

    On develop (aa81d9ab), load eeglab_data_epochs_ica.set, open Edit > Select epochs or events, enter type rt and position 1, then click Ok. The confirmation offers only Cancel. The same selection from the console returns 38 epochs and 76 events.

    EEGLAB passes Cancel, Ok and a third argument naming Ok as the default. EEGPrep passes two arguments, so Ok becomes the default and disappears from the choices. Pass both choices and the default. Accepting should produce the same 38 epochs and 76 events and record the selection once. Cancel and closing the window should keep all 80 epochs, 157 events and the original history. This stays with the parked Edit work in #711. pop_selectevent.m L533 · questdlg2.m L77 · pop_selectevent.py L230

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    gui-paritylater

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions