MCPcopy Create free account
hub / github.com/LMMS/lmms / deleteController

Method deleteController

src/gui/widgets/ControllerRackView.cpp:119–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117
118
119void 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

Callers

nothing calls this directly

Calls 5

getSongFunction · 0.85
getControllerMethod · 0.80
connectionCountMethod · 0.80
removeControllerMethod · 0.80
setTextMethod · 0.45

Tested by

no test coverage detected