mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-11-07 03:22:33 +01:00
Add workaround for Workshop duplicate entries
This commit is contained in:
parent
2519f6a355
commit
8c0cc1664c
@ -6,7 +6,9 @@ CustomPage {
|
||||
pageName: ""
|
||||
|
||||
Component.onCompleted: {
|
||||
workshopListModel.clear()
|
||||
steamWorkshop.searchWorkshop()
|
||||
|
||||
}
|
||||
|
||||
GridView {
|
||||
@ -112,6 +114,7 @@ CustomPage {
|
||||
Item {
|
||||
id: searchBar
|
||||
height: 100
|
||||
visible: false
|
||||
anchors {
|
||||
top: banner.bottom
|
||||
right: parent.right
|
||||
|
@ -81,6 +81,14 @@ unsigned int SteamWorkshopListModel::getBannerID()
|
||||
return m_workshopItemList.at(0)->m_id;
|
||||
}
|
||||
|
||||
void SteamWorkshopListModel::clear()
|
||||
{
|
||||
beginResetModel();
|
||||
m_workshopItemList.clear();
|
||||
m_workshopItemList.squeeze();
|
||||
endResetModel();
|
||||
}
|
||||
|
||||
bool SteamWorkshopListModel::setData(const QModelIndex& index, const QVariant& value, int role)
|
||||
{
|
||||
if (data(index, role) != value) {
|
||||
|
@ -34,6 +34,7 @@ public:
|
||||
Q_INVOKABLE QUrl getBannerUrl();
|
||||
Q_INVOKABLE QString getBannerText();
|
||||
Q_INVOKABLE unsigned int getBannerID();
|
||||
Q_INVOKABLE void clear();
|
||||
|
||||
// Editable:
|
||||
bool setData(const QModelIndex& index, const QVariant& value,
|
||||
|
Loading…
Reference in New Issue
Block a user