Bugs item #2691182, was opened at 2009-03-18 09:31
Message generated for change (Tracker Item Submitted) made by theroe
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=462816&aid=2691182&group_id=51305

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: treelistctrl
Group: last released version
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Richard Öhlinger (theroe)
Assigned to: Ronan Chartois (pgriddev)
Summary: wxTreeListCtrl::GetPrev doesn't work

Initial Comment:
Hi!
I tried to use the GetPrev method of the treelistctrl and i figured out it 
hasn't functioned properly at any time. It seems that it is just an 
unthoughtful copy of GetNext. 

I suggest to repace it with this code:

wxTreeItemId wxTreeListMainWindow::GetPrev (const wxTreeItemId& item, bool 
fulltree) const {
    wxCHECK_MSG (item.IsOk(), wxTreeItemId(), _T("invalid tree item"));
                wxTreeItemId prev = GetPrevSibling (item);

                // if is the first child, the parent is the previous one.
                if (!prev.IsOk()) {
                        return GetItemParent(item);
                }
                wxTreeListItem* prevItem = (wxTreeListItem*)prev.m_pItem;
                while ((fulltree || prevItem->IsExpanded()) && 
(prevItem->GetChildren().GetCount() > 0)) {                      
                        prevItem = prevItem->GetChildren().Last();              
                
                }
                return wxTreeItemId(prevItem);
}

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=462816&aid=2691182&group_id=51305

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
wxCode-users mailing list
wxCode-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxcode-users

Reply via email to