Menu

#23 Problem with ScrolledList (when used with XmEXTENDED_SELECT)

open
nobody
Xm library (13)
5
2009-11-28
2007-06-28
No

Problem with ScrolledList (when used with XmEXTENDED_SELECT) in lesstiff-0.95.0:
--------------------------------------------------------------------------------
1) Problem with <Ctrl><Btn1>

The functionality of <Ctrl><Btn1> is not as mentioned in ‘man XmList’,
following is the paragraph taken from the ‘man XmList’)...
"Extended Select also allows the user to select and deselect discontiguous
ranges of items. Pressing <Ctrl><Btn1> on an item toggles its selection
state but does not deselect any other selected items. Dragging
<Ctrl><Btn1> or pressing or dragging <Shift><Btn1> following a
<Ctrl><Btn1> action sets the selection state of all items between the item
under the pointer and the item on which <Ctrl><Btn1> was pressed to the
state of the item on which <Ctrl><Btn1> was pressed. This action does not
deselect any other selected items outside that range."

The following problems observed when used <Ctrl><Btn1>...
a) Pressing <Ctrl><Btn1> on an item toggles its selection state, but it ALSO select/deselect other selected items randomly after several <Ctrl><Btn1>.

b) Dragging <Ctrl><Btn1> action sets the selection state of all items between the item under the pointer and the item on which <Ctrl><Btn1> was pressed to the state of the item on which <Ctrl><Btn1> was pressed. This action ALSO deselect/select other selected items outside that range after several <Ctrl><Btn1>.

Discussion

  • Anonymous

    Anonymous - 2007-06-28

    Test file to test scrolled list functionality using <Ctrl><Btn1>

     
  • Anonymous

    Anonymous - 2007-06-28

    Logged In: YES
    user_id=1830881
    Originator: YES

    To reproduce this behaviour please first select all the items in the list and then do rapidly <Ctrl><Btn1> click on items. This randomly selects/unselects other items in the list.

     
  • Anonymous

    Anonymous - 2007-06-29

    Logged In: YES
    user_id=1830881
    Originator: YES

    To reproduce this behaviour please first select all the items in the list and then do rapidly <Ctrl><Btn1> click on items. This randomly selects/unselects other items in the list.

     
  • Nobody/Anonymous

    Logged In: NO

    Problem description: When we press <Ctrl><Btn1> and drag the mouse pointer to toggle the selection state of the range of items in the list, it disturbs the selection state of the items outside the range (i.e. the items that are not between the item under the pointer and the item on which <Ctrl><Btn1> was pressed to the).

    Analysis: When we press <Ctrl><Btn1> and drag the mouse pointer following sequence of events occur. [c ~s ~m ~a <Btn1Down>], [Button1<Motion>] [Button1<Motion>] [Button1<Motion>] …, [c ~s ~m ~a <Btn1Up>]. For every occurrence of event [Button1<Motion>] the function ‘_XmListSetSelectRange()’ is called to set the appropriate selection state.

    Now, when the _XmListSetSelectRange() is called for the first time, as the value of ‘List_LastItem(w)’ is not initialized yet, the function ‘_XmListRestoreSelectRange()’, which is called from ‘_XmListSetSelectRange()’ disturbs the selection state of all the items.

    Fix: On occurrence of [c ~s ~m ~a <Btn1Down>], we should initialize the value of ‘List_LastItem(w)’ to the position of the item on which <Ctrl><Btn1> is pressed. This can be done in the function ‘ListBeginToggle()’. Here we can initialize the ‘List_LastItem(w)’ and ‘List_StartItem(w)’ to ‘position’.

    Here is diff of the file ‘lesstif-0.95.0/lib/Xm-2.1/List.c,v 1.3’

    3678d3677
    < List_LastItem(w) = position;

    Can somebody please verify this fix? And if its ok, please add it to the source code.

    Thanks,
    -Sachin Doshi.

     
  • Paul Gevers

    Paul Gevers - 2009-11-28
    • labels: 103129 --> Xm library
     

Log in to post a comment.