[wx-dev] #9675: wxDataViewModel::Reset() and scrollbar problem (wxMac)

wxTrac noreply at wxsite.net
Tue Jul 1 05:32:11 PDT 2008


Ticket URL: <http://trac.wxwidgets.org/ticket/9675>

#9675: wxDataViewModel::Reset() and scrollbar problem (wxMac)
------------------------------------------------------------+---------------
 Reporter:  lillo                                           |       Owner:         
     Type:  defect                                          |      Status:  new    
 Priority:  normal                                          |   Milestone:         
Component:  wxMac                                           |     Version:  2.9-svn
 Keywords:  wxDataViewModel wxDataViewCtrl Reset scrollbar  |   Blockedby:         
    Patch:  1                                               |    Blocking:         
------------------------------------------------------------+---------------
 Hello,

 I think I have found a problem with wxDataViewModel::Reset() under wxMac.
 Imagine this situation: there is a wxDataView control with a model that
 has 1000 elements, and the dataview control is scrolled to show the last
 of these elements. Now the underlying model data is changed and holds far
 less elements than before; Reset() is called and the dataview control
 reflects the change, in that it now contains the correct new elements. But
 the control scroll position is still the old one, attempting to display
 the old (now non-existant) 1000th element.
 This does not happen under wxMSW for example.

 The attached patch fixes this issue by setting the scroll position to
 (0,0) upon Reset().


--
Ticket URL: <http://trac.wxwidgets.org/ticket/9675>


More information about the wx-dev mailing list