fix drawing of the column move hint when the grid is scrolled to the right (#9776)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@55631 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -96,7 +96,7 @@ struct wxGridCellWithAttr
|
|||||||
{
|
{
|
||||||
if (attr != new_attr)
|
if (attr != new_attr)
|
||||||
{
|
{
|
||||||
// "Delete" (i.e. DecRef) the old attribute.
|
// "Delete" (i.e. DecRef) the old attribute.
|
||||||
attr->DecRef();
|
attr->DecRef();
|
||||||
attr = new_attr;
|
attr = new_attr;
|
||||||
// Take ownership of the new attribute, i.e. no IncRef.
|
// Take ownership of the new attribute, i.e. no IncRef.
|
||||||
@@ -5672,6 +5672,7 @@ void wxGrid::ProcessColLabelMouseEvent( wxMouseEvent& event )
|
|||||||
if ( markerX != m_dragLastPos )
|
if ( markerX != m_dragLastPos )
|
||||||
{
|
{
|
||||||
wxClientDC dc( m_colLabelWin );
|
wxClientDC dc( m_colLabelWin );
|
||||||
|
DoPrepareDC(dc);
|
||||||
|
|
||||||
int cw, ch;
|
int cw, ch;
|
||||||
m_colLabelWin->GetClientSize( &cw, &ch );
|
m_colLabelWin->GetClientSize( &cw, &ch );
|
||||||
@@ -10035,7 +10036,7 @@ void wxGrid::ClearAttrCache()
|
|||||||
// wxSafeDecRec(...) might cause event processing that accesses
|
// wxSafeDecRec(...) might cause event processing that accesses
|
||||||
// the cached attribute, if one exists (e.g. by deleting the
|
// the cached attribute, if one exists (e.g. by deleting the
|
||||||
// editor stored within the attribute). Therefore it is important
|
// editor stored within the attribute). Therefore it is important
|
||||||
// to invalidate the cache before calling wxSafeDecRef!
|
// to invalidate the cache before calling wxSafeDecRef!
|
||||||
wxSafeDecRef(oldAttr);
|
wxSafeDecRef(oldAttr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -10454,9 +10455,9 @@ void wxGrid::SetRowSize( int row, int height )
|
|||||||
wxClientDC dc(m_rowLabelWin);
|
wxClientDC dc(m_rowLabelWin);
|
||||||
dc.SetFont(GetLabelFont());
|
dc.SetFont(GetLabelFont());
|
||||||
StringToLines(GetRowLabelValue( row ), lines);
|
StringToLines(GetRowLabelValue( row ), lines);
|
||||||
GetTextBoxSize( dc, lines, &w, &h );
|
GetTextBoxSize( dc, lines, &w, &h );
|
||||||
//check that it is not less than the minimal height
|
//check that it is not less than the minimal height
|
||||||
height = wxMax(h, GetRowMinimalAcceptableHeight());
|
height = wxMax(h, GetRowMinimalAcceptableHeight());
|
||||||
}
|
}
|
||||||
|
|
||||||
// See comment in SetColSize
|
// See comment in SetColSize
|
||||||
@@ -10516,8 +10517,8 @@ void wxGrid::SetColSize( int col, int width )
|
|||||||
else
|
else
|
||||||
GetTextBoxSize( dc, lines, &h, &w );
|
GetTextBoxSize( dc, lines, &h, &w );
|
||||||
width = w + 6;
|
width = w + 6;
|
||||||
//check that it is not less than the minimal width
|
//check that it is not less than the minimal width
|
||||||
width = wxMax(width, GetColMinimalAcceptableWidth());
|
width = wxMax(width, GetColMinimalAcceptableWidth());
|
||||||
}
|
}
|
||||||
|
|
||||||
// should we check that it's bigger than GetColMinimalWidth(col) here?
|
// should we check that it's bigger than GetColMinimalWidth(col) here?
|
||||||
|
Reference in New Issue
Block a user