Showing the changes to interface/src/scripting/SelectionScriptingInterface.cpp (1 of 1 file). Show all
Unified · Split
| @@ -104,10 +104,6 @@ bool SelectionScriptingInterface::enableListHighlight(const QString& listName, c · 103 unmodified lines | |||
| 104 | } | 104 | } |
| 105 | 105 | ||
| 106 | if (!(*highlightStyle).isBoundToList()) { | 106 | if (!(*highlightStyle).isBoundToList()) { |
| 107 | /* auto currentList = _selectedItemsListMap.find(listName); | ||
| 108 | if (currentList == _selectedItemsListMap.end()) { | ||
| 109 | _selectedItemsListMap.insert(listName, GameplayObjects()); | ||
| 110 | }*/ | ||
| 111 | setupHandler(listName); | 107 | setupHandler(listName); |
| 112 | (*highlightStyle).setBoundToList(true); | 108 | (*highlightStyle).setBoundToList(true); |
| 113 | } | 109 | } |
| @@ -248,31 +244,34 @@ QVariantMap SelectionScriptingInterface::getSelectedItemsList(const QString& lis · 134 unmodified lines | |||
| 248 | if ((*currentList).getContainsData()) { | 244 | if ((*currentList).getContainsData()) { |
| 249 | 245 | ||
| 250 | if (!(*currentList).getAvatarIDs().empty()) { | 246 | if (!(*currentList).getAvatarIDs().empty()) { |
| 251 | QList<QUuid> avatarIDs = QList<QUuid>::fromVector(QVector<QUuid>::fromStdVector((*currentList).getAvatarIDs())); | 247 | QList<QVariant> avatarIDs; |
| 252 | list["avatars"].fromValue( avatarIDs); | 248 | for (auto j : (*currentList).getAvatarIDs()) { |
| 249 | avatarIDs.push_back((QUuid)j); | ||
| 250 | } | ||
| 251 | list["avatars"] = (avatarIDs); | ||
| 253 | } | 252 | } |
| 254 | if (!(*currentList).getEntityIDs().empty()) { | 253 | if (!(*currentList).getEntityIDs().empty()) { |
| 255 | // QList<EntityItemID> entityIDs = QList<EntityItemID>::fromVector(QVector<EntityItemID>::fromStdVector((*currentList).getEntityIDs())); | ||
| 256 | QList<QVariant> entityIDs; | 254 | QList<QVariant> entityIDs; |
| 257 | for (auto j : (*currentList).getEntityIDs()) { | 255 | for (auto j : (*currentList).getEntityIDs()) { |
| 258 | entityIDs.push_back( j ); | 256 | entityIDs.push_back((QUuid)j ); |
| 259 | } | 257 | } |
| 260 | list["entities"] = (entityIDs); | 258 | list["entities"] = (entityIDs); |
| 261 | } | 259 | } |
| 262 | if (!(*currentList).getOverlayIDs().empty()) { | 260 | if (!(*currentList).getOverlayIDs().empty()) { |
| 263 | QList<OverlayID> overlayIDs = QList<OverlayID>::fromVector(QVector<OverlayID>::fromStdVector((*currentList).getOverlayIDs())); | 261 | QList<QVariant> overlayIDs; |
| 264 | list["overlays"].fromValue(overlayIDs); | 262 | for (auto j : (*currentList).getOverlayIDs()) { |
| 263 | overlayIDs.push_back((QUuid)j); | ||
| 264 | } | ||
| 265 | list["overlays"] = (overlayIDs); | ||
| 265 | } | 266 | } |
| 266 | 267 | ||
| 267 | return list; | 268 | return list; |
| 268 | } | 269 | } |
| 269 | else { | 270 | else { |
| 270 | //qDebug() << "List named " << listName << " empty"; | ||
| 271 | return list; | 271 | return list; |
| 272 | } | 272 | } |
| 273 | } | 273 | } |
| 274 | else { | 274 | else { |
| 275 | // qDebug() << "List named " << listName << " doesn't exist."; | ||
| 276 | return list; | 275 | return list; |
| 277 | } | 276 | } |
| 278 | } | 277 | } |