Fix issues with dashes in wxQT, thanks @seandepagnier
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77913 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -207,6 +207,8 @@ class wxPenRefData: public wxGDIRefData
|
|||||||
{
|
{
|
||||||
m_qtPen.setCapStyle(Qt::RoundCap);
|
m_qtPen.setCapStyle(Qt::RoundCap);
|
||||||
m_qtPen.setJoinStyle(Qt::RoundJoin);
|
m_qtPen.setJoinStyle(Qt::RoundJoin);
|
||||||
|
m_dashes = NULL;
|
||||||
|
m_dashesSize = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxPenRefData()
|
wxPenRefData()
|
||||||
@@ -307,8 +309,10 @@ void wxPen::SetDashes(int nb_dashes, const wxDash *dash)
|
|||||||
((wxPenRefData *)m_refData)->m_dashesSize = nb_dashes;
|
((wxPenRefData *)m_refData)->m_dashesSize = nb_dashes;
|
||||||
|
|
||||||
QVector<qreal> dashes;
|
QVector<qreal> dashes;
|
||||||
for (int i = 0; i < nb_dashes; i++) {
|
if (dash)
|
||||||
dashes << dash[i];
|
{
|
||||||
|
for (int i = 0; i < nb_dashes; i++)
|
||||||
|
dashes << dash[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
M_PENDATA.setDashPattern(dashes);
|
M_PENDATA.setDashPattern(dashes);
|
||||||
|
Reference in New Issue
Block a user