mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-28 05:34:47 +01:00
Remove the right item from the list
This commit is contained in:
parent
7babf734bf
commit
e4d7f45103
@ -240,10 +240,10 @@ void RasterTile::drawTextItems(QPainter *painter,
|
||||
static void removeDuplicitLabel(QList<TextItem *> &labels, const QString &text,
|
||||
const QRectF &tileRect)
|
||||
{
|
||||
for (int j = 0; j < labels.size(); j++) {
|
||||
TextItem *item = labels.at(j);
|
||||
for (int i = 0; i < labels.size(); i++) {
|
||||
TextItem *item = labels.at(i);
|
||||
if (tileRect.contains(item->boundingRect()) && *(item->text()) == text) {
|
||||
labels.removeOne(item);
|
||||
labels.removeAt(i);
|
||||
delete item;
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user