Eliminated two unneeded arguments from wxPropertyGrid::DoDrawItems()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58706 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1739,9 +1739,7 @@ protected:
|
|||||||
bool DoClearSelection();
|
bool DoClearSelection();
|
||||||
|
|
||||||
int DoDrawItems( wxDC& dc,
|
int DoDrawItems( wxDC& dc,
|
||||||
const wxPGProperty* first_item,
|
const wxRect* clipRect,
|
||||||
const wxPGProperty* last_item,
|
|
||||||
const wxRect* clip_rect,
|
|
||||||
bool isBuffered ) const;
|
bool isBuffered ) const;
|
||||||
|
|
||||||
/** Draws an expand/collapse (ie. +/-) button.
|
/** Draws an expand/collapse (ie. +/-) button.
|
||||||
|
@@ -1562,7 +1562,7 @@ void wxPropertyGrid::DrawItems( wxDC& dc,
|
|||||||
if ( dcPtr )
|
if ( dcPtr )
|
||||||
{
|
{
|
||||||
dc.SetClippingRegion( *clipRect );
|
dc.SetClippingRegion( *clipRect );
|
||||||
paintFinishY = DoDrawItems( *dcPtr, NULL, NULL, clipRect, isBuffered );
|
paintFinishY = DoDrawItems( *dcPtr, clipRect, isBuffered );
|
||||||
}
|
}
|
||||||
|
|
||||||
#if wxPG_DOUBLE_BUFFER
|
#if wxPG_DOUBLE_BUFFER
|
||||||
@@ -1588,30 +1588,17 @@ void wxPropertyGrid::DrawItems( wxDC& dc,
|
|||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
int wxPropertyGrid::DoDrawItems( wxDC& dc,
|
int wxPropertyGrid::DoDrawItems( wxDC& dc,
|
||||||
const wxPGProperty* firstItem,
|
|
||||||
const wxPGProperty* lastItem,
|
|
||||||
const wxRect* clipRect,
|
const wxRect* clipRect,
|
||||||
bool isBuffered ) const
|
bool isBuffered ) const
|
||||||
{
|
{
|
||||||
// TODO: This should somehow be eliminated.
|
const wxPGProperty* firstItem;
|
||||||
wxRect tempClipRect;
|
const wxPGProperty* lastItem;
|
||||||
if ( !clipRect )
|
|
||||||
{
|
|
||||||
wxASSERT(firstItem);
|
|
||||||
wxASSERT(lastItem);
|
|
||||||
tempClipRect = GetPropertyRect(firstItem, lastItem);
|
|
||||||
clipRect = &tempClipRect;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( !firstItem )
|
firstItem = DoGetItemAtY(clipRect->y);
|
||||||
firstItem = DoGetItemAtY(clipRect->y);
|
lastItem = DoGetItemAtY(clipRect->y+clipRect->height-1);
|
||||||
|
|
||||||
if ( !lastItem )
|
if ( !lastItem )
|
||||||
{
|
lastItem = GetLastItem( wxPG_ITERATE_VISIBLE );
|
||||||
lastItem = DoGetItemAtY(clipRect->y+clipRect->height-1);
|
|
||||||
if ( !lastItem )
|
|
||||||
lastItem = GetLastItem( wxPG_ITERATE_VISIBLE );
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( m_frozen || m_height < 1 || firstItem == NULL )
|
if ( m_frozen || m_height < 1 || firstItem == NULL )
|
||||||
return clipRect->y;
|
return clipRect->y;
|
||||||
|
Reference in New Issue
Block a user