mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-06-01 07:43:03 +02:00
Merge consecutive same colors
This commit is contained in:
parent
cebe4cde69
commit
018ec28339
@ -339,8 +339,12 @@ static uint color(const QList<QByteArray> &list)
|
||||
{
|
||||
uint c = 0;
|
||||
|
||||
for (int i = 0; i < list.size() && i < 4; i++)
|
||||
c |= list.at(i).toUInt() << (i * 4);
|
||||
for (int i = 0, j = 0; i < list.size() && j < 4; i++) {
|
||||
if (!(i && list.at(i) == list.at(i-1))) {
|
||||
c |= list.at(i).toUInt() << (j * 4);
|
||||
j++;
|
||||
}
|
||||
}
|
||||
|
||||
return c;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user