fix HitTest
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41612 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
fc12c1cb58
commit
48ac3cf8e0
@ -18,10 +18,6 @@
|
|||||||
// headers
|
// headers
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
#if defined(__GNUG__) && !defined(__APPLE__)
|
|
||||||
#pragma implementation "treelistctrl.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// For compilers that support precompilation, includes "wx.h".
|
// For compilers that support precompilation, includes "wx.h".
|
||||||
#include "wx/wxprec.h"
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
@ -2673,7 +2669,7 @@ void wxTreeListMainWindow::SelectItem (const wxTreeItemId& itemId,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void wxTreeListMainWindow::SelectAll() {
|
void wxTreeListMainWindow::SelectAll() {
|
||||||
wxCHECK_RET (HasFlag(wxTR_MULTIPLE), _T("invalid tree style"));
|
wxCHECK_RET (HasFlag(wxTR_MULTIPLE), _T("invalid tree style, must have wxTR_MULTIPLE style to select all items"));
|
||||||
|
|
||||||
// send event to user code
|
// send event to user code
|
||||||
wxTreeEvent event (wxEVT_COMMAND_TREE_SEL_CHANGING, m_owner->GetId());
|
wxTreeEvent event (wxEVT_COMMAND_TREE_SEL_CHANGING, m_owner->GetId());
|
||||||
@ -2694,6 +2690,7 @@ void wxTreeListMainWindow::SelectAll() {
|
|||||||
wxTreeItemId root = GetRootItem();
|
wxTreeItemId root = GetRootItem();
|
||||||
wxTreeListItem *first = (wxTreeListItem *)GetFirstChild (root, cookie).m_pItem;
|
wxTreeListItem *first = (wxTreeListItem *)GetFirstChild (root, cookie).m_pItem;
|
||||||
wxTreeListItem *last = (wxTreeListItem *)GetLastChild (root, cookie).m_pItem;
|
wxTreeListItem *last = (wxTreeListItem *)GetLastChild (root, cookie).m_pItem;
|
||||||
|
if (!first || !last) return;
|
||||||
if (!TagAllChildrenUntilLast (first, last)) {
|
if (!TagAllChildrenUntilLast (first, last)) {
|
||||||
TagNextChildren (first, last);
|
TagNextChildren (first, last);
|
||||||
}
|
}
|
||||||
@ -3793,6 +3790,7 @@ void wxTreeListMainWindow::OnMouse (wxMouseEvent &event) {
|
|||||||
#else
|
#else
|
||||||
nevent.SetItem (item); // the item the drag is ended
|
nevent.SetItem (item); // the item the drag is ended
|
||||||
#endif
|
#endif
|
||||||
|
nevent.SetPoint (p);
|
||||||
nevent.Veto(); // dragging must be explicit allowed!
|
nevent.Veto(); // dragging must be explicit allowed!
|
||||||
m_owner->GetEventHandler()->ProcessEvent (nevent);
|
m_owner->GetEventHandler()->ProcessEvent (nevent);
|
||||||
|
|
||||||
@ -4618,8 +4616,7 @@ void wxTreeListCtrl::ScrollTo(const wxTreeItemId& item)
|
|||||||
|
|
||||||
wxTreeItemId wxTreeListCtrl::HitTest(const wxPoint& pos, int& flags, int& column)
|
wxTreeItemId wxTreeListCtrl::HitTest(const wxPoint& pos, int& flags, int& column)
|
||||||
{
|
{
|
||||||
wxPoint p = m_main_win->ScreenToClient (ClientToScreen (pos));
|
return m_main_win->HitTest (pos, flags, column);
|
||||||
return m_main_win->HitTest (p, flags, column);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxTreeListCtrl::GetBoundingRect(const wxTreeItemId& item, wxRect& rect,
|
bool wxTreeListCtrl::GetBoundingRect(const wxTreeItemId& item, wxRect& rect,
|
||||||
|
Loading…
Reference in New Issue
Block a user