Fix background colour returned by wxTextCtrl::GetStyle() in wxMSW
Don't return the background colour unless it's really set, otherwise we returned black background even if it was never changed.
This commit is contained in:
@@ -94,6 +94,7 @@ wxMSW:
|
||||
- Fix crash when using wxCHMHelpController() in 64 bit builds (Xlord2).
|
||||
- Fix MDI menu display after failure to create a child frame (troelsk).
|
||||
- Fix wxScreenDC::GetSize() with multiple monitors (iwbnwif).
|
||||
- Fix background colour returned by wxTextCtrl::GetStyle() (Andreas Falkenhahn).
|
||||
|
||||
wxOSX:
|
||||
|
||||
|
@@ -3054,9 +3054,14 @@ bool wxTextCtrl::GetStyle(long position, wxTextAttr& style)
|
||||
#if wxUSE_RICHEDIT2
|
||||
if ( m_verRichEdit != 1 )
|
||||
{
|
||||
// cf.dwMask |= CFM_BACKCOLOR;
|
||||
// Notice that, surprisingly, CFM_BACKCOLOR is still set in the mask
|
||||
// even when CFE_AUTOBACKCOLOR is set in the effects, indicating that
|
||||
// the background colour is not used.
|
||||
if ( !(cf.dwEffects & CFE_AUTOBACKCOLOR) && (cf.dwMask & CFM_BACKCOLOR) )
|
||||
{
|
||||
style.SetBackgroundColour(wxColour(cf.crBackColor));
|
||||
}
|
||||
}
|
||||
#endif // wxUSE_RICHEDIT2
|
||||
|
||||
// now get the paragraph formatting
|
||||
|
Reference in New Issue
Block a user