don't reset the selection after event was vetoed if there is no old selection

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40805 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-08-24 21:00:07 +00:00
parent e32bcef6e7
commit 9f30729a03

View File

@@ -651,7 +651,8 @@ int wxTreebook::DoSetSelection(size_t pagePos)
else // page change vetoed
{
// tree selection might have already had changed
tree->SelectItem(DoInternalGetPage(oldSel));
if ( oldSel != wxNOT_FOUND )
tree->SelectItem(DoInternalGetPage(oldSel));
}
return oldSel;