GUIListItem.ItemSelectedHandler gets triggered twice using ScrollOffset in Filmstrip (1 Viewer)

ltfearme

Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,751
    7,196
    Sydney
    Home Country
    Australia Australia
    TV-Server Version:
    MediaPortal Version: 1.0.0.0 RC4
    MediaPortal Skin: StreamedMP
    Windows Version: WinXP SP3
    CPU Type: Intel E6600 Core 2 Duo
    HDD: 500GB Western Digital
    Memory: 2GB Corsair 5400C4
    Motherboard: Intel DG965OT
    Video Card: Asus 8600GT Silent
    Video Card Driver:
    Sound Card: Intel HD
    Sound Card AC3: Optical Out
    Sound Card Driver:
    1. TV Card:
    1. TV Card Type:
    1. TV Card Driver:
    2. TV Card:
    2. TV Card Type:
    2. TV Card Driver:
    3. TV Card:
    3. TV Card Type:
    3. TV Card Driver:
    4. TV Card:
    4. TV Card Type:
    4. TV Card Driver:
    MPEG2 Video Codec: ffdshow
    MPEG2 Audio Codec: ffdshow
    h.264 Video Codec:
    Satelite/CableTV Provider:
    HTPC Case: Antec Fusion
    Cooling:
    Power Supply: Antec 550W
    Remote: Harmony 360
    TV: Sony Bravia 46X2000
    TV - HTPC Connection: HDMI

    In MP-TVSeries plugin, we use a Filmstrip view. I noticed that when subscribing to GUIListItem.ItemSelectedHandler() the event gets triggered twice once you start scrolling past the defined scrolloffset range as defined in the skin e.g.

    StreamedMP uses a scrolloffset of 4: <scrollOffset>4</scrollOffset>

    Once you start scrolling past item 4, item selected event gets triggered twice. Once for the current item before moving and then again for the item that is finally selected.

    Steps to reproduce the problem.

    1. Create a FilmStrip control in active skin with a scrolloffset defined
    2. Set Facade to Filmstrip (GUIFacadeControl.ViewMode.Filmstrip)
    3. Subscribe to GUIListItem.ItemSelectedHandler e.g.

    GUIListItem gli = arg.Argument as GUIListItem;
    gli.OnItemSelected+=new GUIListItem.ItemSelectedHandler(onFacadeItemSelected);


    4. Start selecting item by moving right/left

    Result: If item selected is before the scrolloffset or after (ItemCount - scrolloffset) then onFacadeItemSelected is only triggered once. If its inbetween its triggered twice.

    It should only be triggered once regardless of scrolloffset.
     

    Users who are viewing this thread

    Top Bottom