| 211 | } |
| 212 | |
| 213 | void UBFeaturesWidget::deleteSelectedElements() |
| 214 | { |
| 215 | QModelIndexList selected = centralWidget->listView()->selectionModel()->selectedIndexes(); |
| 216 | |
| 217 | QList<UBFeature> featureasToMove; |
| 218 | for (int i = 0; i < selected.count(); i++) |
| 219 | { |
| 220 | featureasToMove.append(controller->getFeature(selected.at(i), objNameFeatureList)); |
| 221 | } |
| 222 | |
| 223 | foreach (UBFeature feature, featureasToMove) |
| 224 | { |
| 225 | if (feature.isDeletable()) { |
| 226 | if (feature.inTrash()) { |
| 227 | controller->deleteItem(feature); |
| 228 | } else { |
| 229 | controller->moveToTrash(feature, true); |
| 230 | } |
| 231 | } |
| 232 | } |
| 233 | |
| 234 | controller->refreshModels(); |
| 235 | } |
| 236 | |
| 237 | void UBFeaturesWidget::rescanModel() |
| 238 | { |
nothing calls this directly
no test coverage detected