Allow setting font and brush in DC when the qt painter is not active in wxQT, thanks @seandpagnier

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77937 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Mariano Reingart 2014-09-29 04:26:50 +00:00
parent e3f67c52ee
commit 7ccffa24be

View File

@ -63,6 +63,7 @@ void wxQtDCImpl::QtPreparePainter( )
{
m_qtPainter->setPen( wxPen().GetHandle() );
m_qtPainter->setBrush( wxBrush().GetHandle() );
m_qtPainter->setFont( wxFont().GetHandle() );
}
else
{
@ -106,6 +107,7 @@ void wxQtDCImpl::SetFont(const wxFont& font)
{
m_font = font;
if (m_qtPainter->isActive())
m_qtPainter->setFont(font.GetHandle());
}
@ -153,6 +155,7 @@ void wxQtDCImpl::SetBackground(const wxBrush& brush)
{
m_backgroundBrush = brush;
if (m_qtPainter->isActive())
m_qtPainter->setBackground(brush.GetHandle());
}