| 253 | } |
| 254 | |
| 255 | void ExternalResourcesPage::removeItems(const QItemSelection& selection) |
| 256 | { |
| 257 | if (m_instance != nullptr && m_instance->isRunning()) { |
| 258 | auto response = CustomMessageBox::selectable(this, tr("Confirm Delete"), |
| 259 | tr("If you remove this resource while the game is running it may crash your game.\n" |
| 260 | "Are you sure you want to do this?"), |
| 261 | QMessageBox::Warning, QMessageBox::Yes | QMessageBox::No, QMessageBox::No) |
| 262 | ->exec(); |
| 263 | |
| 264 | if (response != QMessageBox::Yes) |
| 265 | return; |
| 266 | } |
| 267 | m_model->deleteResources(selection.indexes()); |
| 268 | } |
| 269 | |
| 270 | void ExternalResourcesPage::enableItem() |
| 271 | { |
nothing calls this directly
no test coverage detected