Menu

#72 Keeps switching to !n for people

open
nobody
None
5
2013-11-25
2002-05-06
No

Version: 3.0.12

Going to a person & switching to !x
(extended mode, person)
then to their family & switching to !x
(extended mode, family),
and then back to a person, the program
switches back to normal mode for persons.

That is, it forgets it was in extended mode for
persons, but it remembers it was in extended
mode for families.

Discussion

  • Matthew Emmerton

    Logged In: YES
    user_id=61514

    Both the indi and family browse mode are kept as statics
    within the browse functions, so state is preserved across
    calls.

    However, when browsing to a person, we use browse_indi
    which calls browse_indi_modes with mode='n' which
    effectively resets the indi browse mode to normal mode in all
    cases, thus forgetting the previous state.

    The solution that works for me involves:
    - making the fam and indi browse mode vars globals
    - removing the mode parameter of browse_indi_modes
    - removing the explicit mode='n' from browse_indi

    Technically, I don't have to make any changes to the fam
    browse mode code, but I thought that it would make the most
    sense to ensure that the fam and indi code are as similar as
    possible.

    With these changes, the only places where we update the
    browse mode are:
    - within a browse function, to handle browse mode commands
    - when calling browse_pedigree, which sets the mode to 'p'
    explicitly

     
  • Matthew Emmerton

    Logged In: YES
    user_id=61514

    Both the indi and family browse mode are kept as statics
    within the browse functions, so state is preserved across
    calls.

    However, when browsing to a person, we use browse_indi
    which calls browse_indi_modes with mode='n' which
    effectively resets the indi browse mode to normal mode in all
    cases, thus forgetting the previous state.

    The solution that works for me involves:
    - making the fam and indi browse mode vars globals
    - removing the mode parameter of browse_indi_modes
    - removing the explicit mode='n' from browse_indi

    Technically, I don't have to make any changes to the fam
    browse mode code, but I thought that it would make the most
    sense to ensure that the fam and indi code are as similar as
    possible.

    With these changes, the only places where we update the
    browse mode are:
    - within a browse function, to handle browse mode commands
    - when calling browse_pedigree, which sets the mode to 'p'
    explicitly

     
  • elsapo

    elsapo - 2005-09-20

    Logged In: YES
    user_id=1195173

    Sounds sensible to me.

     

Log in to post a comment.