Skip to content

pop_subcomp output in eegh drops keepflag #946

Description

@brian-erickson-phd

com = sprintf('EEG = pop_subcomp( EEG, [%s], %d);', int2str(componentsOri(:)'), plotag);

The GUI “Or list of component(s) to retain” path in pop_subcomp() appears to execute with keepflag = 1 internally, but the command history string written to com/eegh drops that flag. On line 232, the function always formats the history as EEG = pop_subcomp( EEG, [components], plotag);, so a GUI action like “keep only component 2” is recorded as EEG = pop_subcomp( EEG, [2], 0); instead of EEG = pop_subcomp( EEG, [2], 0, 1);. Re-running the saved command therefore reverses the intended semantics and removes component 2 rather than keeping only component 2. The fix should be to include keepflag when constructing com so GUI retain operations are faithfully reproduced in history.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions