mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 19:50:05 +00:00
Don't add duplicate entries to the resource explorer
This commit is contained in:
parent
df2474c383
commit
0c8047b1f4
1 changed files with 10 additions and 4 deletions
|
|
@ -105,10 +105,16 @@ RadarProductModelImpl::RadarProductModelImpl(RadarProductModel* self) :
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create leaf item for product time
|
// Find existing time item (e.g., 2023-04-10 10:11:12)
|
||||||
model_->AppendRow(productItem,
|
const QString timeString =
|
||||||
new TreeItem {QString::fromStdString(
|
QString::fromStdString(util::TimeString(latestTime));
|
||||||
util::TimeString(latestTime))});
|
TreeItem* timeItem = productItem->FindChild(0, timeString);
|
||||||
|
|
||||||
|
if (timeItem == nullptr)
|
||||||
|
{
|
||||||
|
// Create leaf item for product time
|
||||||
|
model_->AppendRow(productItem, new TreeItem {timeString});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
Qt::QueuedConnection);
|
Qt::QueuedConnection);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue