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:
parent
e3f67c52ee
commit
7ccffa24be
@ -63,6 +63,7 @@ void wxQtDCImpl::QtPreparePainter( )
|
||||
{
|
||||
m_qtPainter->setPen( wxPen().GetHandle() );
|
||||
m_qtPainter->setBrush( wxBrush().GetHandle() );
|
||||
m_qtPainter->setFont( wxFont().GetHandle() );
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -105,8 +106,9 @@ wxSize wxQtDCImpl::GetPPI() const
|
||||
void wxQtDCImpl::SetFont(const wxFont& font)
|
||||
{
|
||||
m_font = font;
|
||||
|
||||
m_qtPainter->setFont(font.GetHandle());
|
||||
|
||||
if (m_qtPainter->isActive())
|
||||
m_qtPainter->setFont(font.GetHandle());
|
||||
}
|
||||
|
||||
void wxQtDCImpl::SetPen(const wxPen& pen)
|
||||
@ -153,7 +155,8 @@ void wxQtDCImpl::SetBackground(const wxBrush& brush)
|
||||
{
|
||||
m_backgroundBrush = brush;
|
||||
|
||||
m_qtPainter->setBackground(brush.GetHandle());
|
||||
if (m_qtPainter->isActive())
|
||||
m_qtPainter->setBackground(brush.GetHandle());
|
||||
}
|
||||
|
||||
void wxQtDCImpl::SetBackgroundMode(int mode)
|
||||
|
Loading…
Reference in New Issue
Block a user