Fix some stylistic and wxT issues.

This commit is contained in:
Jay Nabonne
2019-02-08 14:04:27 +00:00
parent 8844e16b03
commit 6014eb37ea

View File

@@ -893,8 +893,8 @@ wxTreeItemId wxTreeCtrl::GetFirstVisibleItem() const
wxTreeItemId wxTreeCtrl::GetNextVisible(const wxTreeItemId& item) const wxTreeItemId wxTreeCtrl::GetNextVisible(const wxTreeItemId& item) const
{ {
wxCHECK_MSG(item.IsOk(), wxTreeItemId(), wxT("invalid tree item")); wxCHECK_MSG(item.IsOk(), wxTreeItemId(), "invalid tree item");
wxASSERT_MSG(IsVisible(item), wxT("this item itself should be visible")); wxASSERT_MSG(IsVisible(item), "this item itself should be visible");
wxTreeItemId id = item; wxTreeItemId id = item;
if ( id.IsOk() ) if ( id.IsOk() )
@@ -910,8 +910,8 @@ wxTreeItemId wxTreeCtrl::GetNextVisible(const wxTreeItemId& item) const
wxTreeItemId wxTreeCtrl::GetPrevVisible(const wxTreeItemId& item) const wxTreeItemId wxTreeCtrl::GetPrevVisible(const wxTreeItemId& item) const
{ {
wxCHECK_MSG(item.IsOk(), wxTreeItemId(), wxT("invalid tree item")); wxCHECK_MSG(item.IsOk(), wxTreeItemId(), "invalid tree item");
wxASSERT_MSG(IsVisible(item), wxT("this item itself should be visible")); wxASSERT_MSG(IsVisible(item), "this item itself should be visible");
// find out the starting point // find out the starting point
wxTreeItemId prevItem = GetPrevSibling(item); wxTreeItemId prevItem = GetPrevSibling(item);
@@ -1247,10 +1247,16 @@ wxTreeItemId wxTreeCtrl::DoTreeHitTest(const wxPoint& point, int& flags) const
int w, h; int w, h;
GetSize(&w, &h); GetSize(&w, &h);
flags = 0; flags = 0;
if ( point.x < 0 ) flags |= wxTREE_HITTEST_TOLEFT; if ( point.x < 0 )
else if ( point.x > w ) flags |= wxTREE_HITTEST_TORIGHT; flags |= wxTREE_HITTEST_TOLEFT;
if ( point.y < 0 ) flags |= wxTREE_HITTEST_ABOVE; else if ( point.x > w )
else if ( point.y > h ) flags |= wxTREE_HITTEST_BELOW; flags |= wxTREE_HITTEST_TORIGHT;
if ( point.y < 0 )
flags |= wxTREE_HITTEST_ABOVE;
else if ( point.y > h )
flags |= wxTREE_HITTEST_BELOW;
if ( flags != 0 ) if ( flags != 0 )
return wxTreeItemId(); return wxTreeItemId();
@@ -1276,7 +1282,7 @@ void wxTreeCtrl::SendDeleteEvent(const wxTreeItemId &item)
wxTreeItemId wxTreeCtrl::GetNext(const wxTreeItemId &item) const wxTreeItemId wxTreeCtrl::GetNext(const wxTreeItemId &item) const
{ {
wxCHECK_MSG(item.IsOk(), wxTreeItemId(), wxT("invalid tree item")); wxCHECK_MSG(item.IsOk(), wxTreeItemId(), "invalid tree item");
QTreeWidgetItem *qTreeItem = wxQtConvertTreeItem(item); QTreeWidgetItem *qTreeItem = wxQtConvertTreeItem(item);