Changed wxGridCellAttr::HasAlignment to treat values of -1 as no

alignment because wxALIGN_LEFT and wxALIGN_TOP are 0.

Updated griddemo.cpp to use correct alignment defs.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@7864 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Michael Bedward
2000-07-27 04:09:21 +00:00
parent 4c7277db42
commit 0767cb6f44
2 changed files with 28 additions and 27 deletions

View File

@@ -564,7 +564,8 @@ public:
wxGridCellAttr()
{
Init();
SetAlignment(0, 0);
// MB: args used to be 0,0 here but wxALIGN_LEFT is 0
SetAlignment(-1, -1);
}
// VZ: considering the number of members wxGridCellAttr has now, this ctor
@@ -610,7 +611,7 @@ public:
bool HasTextColour() const { return m_colText.Ok(); }
bool HasBackgroundColour() const { return m_colBack.Ok(); }
bool HasFont() const { return m_font.Ok(); }
bool HasAlignment() const { return m_hAlign || m_vAlign; }
bool HasAlignment() const { return (m_hAlign != -1 || m_vAlign != -1); }
bool HasRenderer() const { return m_renderer != NULL; }
bool HasEditor() const { return m_editor != NULL; }