Only overflow left-aligned cells in wxGrid
Doing it for cells using a different alignment doesn't work correctly and it's not clear whether it really makes sense, so just don't do it at all for now. Closes https://github.com/wxWidgets/wxWidgets/pull/1726
This commit is contained in:
committed by
Vadim Zeitlin
parent
a40acbb28e
commit
e0c09c8438
@@ -6086,7 +6086,11 @@ void wxGrid::DrawGridCellArea( wxDC& dc, const wxGridCellCoordsArray& cells )
|
|||||||
{
|
{
|
||||||
if (!m_table->IsEmptyCell(row + l, j))
|
if (!m_table->IsEmptyCell(row + l, j))
|
||||||
{
|
{
|
||||||
if (GetCellOverflow(row + l, j))
|
wxGridCellAttr *attr = GetCellAttr(row + l, j);
|
||||||
|
const bool canOverflow = attr->CanOverflow();
|
||||||
|
attr->DecRef();
|
||||||
|
|
||||||
|
if ( canOverflow )
|
||||||
{
|
{
|
||||||
wxGridCellCoords cell(row + l, j);
|
wxGridCellCoords cell(row + l, j);
|
||||||
bool marked = false;
|
bool marked = false;
|
||||||
|
@@ -591,7 +591,7 @@ void wxGridCellStringRenderer::Draw(wxGrid& grid,
|
|||||||
// erase only this cells background, overflow cells should have been erased
|
// erase only this cells background, overflow cells should have been erased
|
||||||
wxGridCellRenderer::Draw(grid, attr, dc, rectCell, row, col, isSelected);
|
wxGridCellRenderer::Draw(grid, attr, dc, rectCell, row, col, isSelected);
|
||||||
|
|
||||||
if (attr.GetOverflow())
|
if ( attr.CanOverflow() )
|
||||||
{
|
{
|
||||||
int hAlign, vAlign;
|
int hAlign, vAlign;
|
||||||
attr.GetAlignment(&hAlign, &vAlign);
|
attr.GetAlignment(&hAlign, &vAlign);
|
||||||
|
Reference in New Issue
Block a user