* BUG: Paint.Dash correctly accepts an array with one single element.

[GB.QT5]
* BUG: Paint.Dash correctly accepts an array with one single element.


git-svn-id: svn://localhost/gambas/trunk@7638 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Benoît Minisini 2016-03-16 02:59:52 +00:00
parent c866e8a8ee
commit c6f5e75c0e

View file

@ -581,7 +581,7 @@ static void Dash(GB_PAINT *d, int set, float **dashes, int *count)
else
{
QVector<qreal> dv;
qreal d;
qreal d = 0;
for (int i = 0; i < *count; i++)
{
@ -590,6 +590,10 @@ static void Dash(GB_PAINT *d, int set, float **dashes, int *count)
d = DASH_ZERO;
dv << (qreal)d;
}
if (*count == 1)
dv << (qreal)d;
pen.setStyle(Qt::CustomDashLine);
pen.setDashPattern(dv);
}