Fix some stylistic and wxT issues.
This commit is contained in:
@@ -883,7 +883,7 @@ wxTreeItemId wxTreeCtrl::GetFirstVisibleItem() const
|
|||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if (IsVisible(itemid))
|
if ( IsVisible(itemid) )
|
||||||
return itemid;
|
return itemid;
|
||||||
itemid = GetNext(itemid);
|
itemid = GetNext(itemid);
|
||||||
} while ( itemid.IsOk() );
|
} while ( itemid.IsOk() );
|
||||||
@@ -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,16 +1247,22 @@ 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();
|
||||||
|
|
||||||
QTreeWidgetItem *hitItem = m_qtTreeWidget->itemAt(wxQtConvertPoint(point));
|
QTreeWidgetItem *hitItem = m_qtTreeWidget->itemAt(wxQtConvertPoint(point));
|
||||||
|
|
||||||
if (hitItem == NULL)
|
if ( hitItem == NULL )
|
||||||
flags |= wxTREE_HITTEST_NOWHERE;
|
flags |= wxTREE_HITTEST_NOWHERE;
|
||||||
|
|
||||||
return wxQtConvertTreeItem(hitItem);
|
return wxQtConvertTreeItem(hitItem);
|
||||||
@@ -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);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user