X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3acd4349a5d3c1cde803eef1a9d8d5609b40531d..68a14aeeeb7d09a9ec3e9f098c039a4eaf1f12ff:/samples/treectrl/treetest.cpp diff --git a/samples/treectrl/treetest.cpp b/samples/treectrl/treetest.cpp index 494b2e249f..351c59f045 100644 --- a/samples/treectrl/treetest.cpp +++ b/samples/treectrl/treetest.cpp @@ -5,7 +5,7 @@ // Modified by: // Created: 04/01/98 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem +// Copyright: (c) Julian Smart // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// @@ -696,7 +696,7 @@ void MyTreeCtrl::CreateButtonsImageList(int size) } else { - images->Add(wxBitmap(icons[i].ConvertToImage().Rescale(size, size))); + images->Add(wxBitmap(wxBitmap(icons[i]).ConvertToImage().Rescale(size, size))); } } @@ -836,6 +836,7 @@ void MyTreeCtrl::DoToggleIcon(const wxTreeItemId& item) void MyTreeCtrl::name(wxTreeEvent& event) \ { \ wxLogMessage(wxT(#name)); \ + SetLastItem(wxTreeItemId()); \ event.Skip(); \ } @@ -854,7 +855,7 @@ TREE_EVENT_HANDLER(OnSelChanging) void LogKeyEvent(const wxChar *name, const wxKeyEvent& event) { wxString key; - long keycode = event.KeyCode(); + long keycode = event.GetKeyCode(); { switch ( keycode ) { @@ -1016,7 +1017,7 @@ void MyTreeCtrl::OnEndDrag(wxTreeEvent& event) if ( itemDst.IsOk() && !ItemHasChildren(itemDst) ) { // copy to the parent then - itemDst = GetParent(itemDst); + itemDst = GetItemParent(itemDst); } if ( !itemDst.IsOk() )