| 117 | |
| 118 | |
| 119 | void ControllerRackView::deleteController( ControllerView * _view ) |
| 120 | { |
| 121 | Controller * c = _view->getController(); |
| 122 | |
| 123 | if( c->connectionCount() > 0 ) |
| 124 | { |
| 125 | QMessageBox msgBox; |
| 126 | msgBox.setIcon( QMessageBox::Question ); |
| 127 | msgBox.setWindowTitle( tr("Confirm Delete") ); |
| 128 | msgBox.setText( tr("Confirm delete? There are existing connection(s) " |
| 129 | "associated with this controller. There is no way to undo.") ); |
| 130 | msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel); |
| 131 | if( msgBox.exec() != QMessageBox::Ok ) |
| 132 | { |
| 133 | return; |
| 134 | } |
| 135 | } |
| 136 | |
| 137 | Song * song = Engine::getSong(); |
| 138 | song->removeController( c ); |
| 139 | } |
| 140 | |
| 141 | |
| 142 |
nothing calls this directly
no test coverage detected