Merge the cell size attribute the same way that other attributes are
merged, e.g., if it is already set to a non-default value in the current wxGridCellAttr object then don't merge from the other. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34479 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -696,6 +696,7 @@ public:
|
||||
bool HasEditor() const { return m_editor != NULL; }
|
||||
bool HasReadWriteMode() const { return m_isReadOnly != Unset; }
|
||||
bool HasOverflowMode() const { return m_overflow != UnsetOverflow; }
|
||||
bool HasSize() const { return m_sizeRows != 1 || m_sizeCols != 1; }
|
||||
|
||||
const wxColour& GetTextColour() const;
|
||||
const wxColour& GetBackgroundColour() const;
|
||||
|
@@ -2142,8 +2142,8 @@ void wxGridCellAttr::MergeWith(wxGridCellAttr *mergefrom)
|
||||
mergefrom->GetAlignment( &hAlign, &vAlign);
|
||||
SetAlignment(hAlign, vAlign);
|
||||
}
|
||||
|
||||
mergefrom->GetSize( &m_sizeRows, &m_sizeCols );
|
||||
if ( !HasSize() && mergefrom->HasSize() )
|
||||
mergefrom->GetSize( &m_sizeRows, &m_sizeCols );
|
||||
|
||||
// Directly access member functions as GetRender/Editor don't just return
|
||||
// m_renderer/m_editor
|
||||
@@ -2914,6 +2914,7 @@ wxGridCellAttr *wxGridTableBase::GetAttr(int row, int col, wxGridCellAttr::wxAtt
|
||||
return (wxGridCellAttr *)NULL;
|
||||
}
|
||||
|
||||
|
||||
void wxGridTableBase::SetAttr(wxGridCellAttr* attr, int row, int col)
|
||||
{
|
||||
if ( m_attrProvider )
|
||||
|
Reference in New Issue
Block a user