Showing the changes to interface/src/scripting/SelectionScriptingInterface.cpp (1 of 1 file). Show all
Unified · Split
| @@ -247,35 +247,32 @@ QVariantMap SelectionScriptingInterface::getSelectedItemsList(const QString& lis · 246 unmodified lines | |||
| 247 | QVariantMap list; | 247 | QVariantMap list; |
| 248 | auto currentList = _selectedItemsListMap.find(listName); | 248 | auto currentList = _selectedItemsListMap.find(listName); |
| 249 | if (currentList != _selectedItemsListMap.end()) { | 249 | if (currentList != _selectedItemsListMap.end()) { |
| 250 | if ((*currentList).getContainsData()) { | 250 | QList<QVariant> avatarIDs; |
| 251 | QList<QVariant> entityIDs; | ||
| 252 | QList<QVariant> overlayIDs; | ||
| 251 | 253 | ||
| 254 | if ((*currentList).getContainsData()) { | ||
| 252 | if (!(*currentList).getAvatarIDs().empty()) { | 255 | if (!(*currentList).getAvatarIDs().empty()) { |
| 253 | QList<QVariant> avatarIDs; | ||
| 254 | for (auto j : (*currentList).getAvatarIDs()) { | 256 | for (auto j : (*currentList).getAvatarIDs()) { |
| 255 | avatarIDs.push_back((QUuid)j); | 257 | avatarIDs.push_back((QUuid)j); |
| 256 | } | 258 | } |
| 257 | list["avatars"] = (avatarIDs); | ||
| 258 | } | 259 | } |
| 259 | if (!(*currentList).getEntityIDs().empty()) { | 260 | if (!(*currentList).getEntityIDs().empty()) { |
| 260 | QList<QVariant> entityIDs; | ||
| 261 | for (auto j : (*currentList).getEntityIDs()) { | 261 | for (auto j : (*currentList).getEntityIDs()) { |
| 262 | entityIDs.push_back((QUuid)j ); | 262 | entityIDs.push_back((QUuid)j ); |
| 263 | } | 263 | } |
| 264 | list["entities"] = (entityIDs); | ||
| 265 | } | 264 | } |
| 266 | if (!(*currentList).getOverlayIDs().empty()) { | 265 | if (!(*currentList).getOverlayIDs().empty()) { |
| 267 | QList<QVariant> overlayIDs; | ||
| 268 | for (auto j : (*currentList).getOverlayIDs()) { | 266 | for (auto j : (*currentList).getOverlayIDs()) { |
| 269 | overlayIDs.push_back((QUuid)j); | 267 | overlayIDs.push_back((QUuid)j); |
| 270 | } | 268 | } |
| 271 | list["overlays"] = (overlayIDs); | ||
| 272 | } | 269 | } |
| 273 | |||
| 274 | return list; | ||
| 275 | } | ||
| 276 | else { | ||
| 277 | return list; | ||
| 278 | } | 270 | } |
| 271 | list["avatars"] = (avatarIDs); | ||
| 272 | list["entities"] = (entityIDs); | ||
| 273 | list["overlays"] = (overlayIDs); | ||
| 274 | |||
| 275 | return list; | ||
| 279 | } | 276 | } |
| 280 | else { | 277 | else { |
| 281 | return list; | 278 | return list; |